public class SimpleConnector extends Object implements Connector, Serializable
Connector acts as a simple, two-way
connection between two fixed points. Those points may lie on any two
Levels, and may be the same Level.| Constructor and Description |
|---|
SimpleConnector(Level level1,
int level1X,
int level1Y,
Level level2,
int level2X,
int level2Y)
Creates an instance of
SimpleConnector. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
enteredConnection(CharacterManager mgr)
Transitions the given character to the other point connected to
their current location.
|
protected void |
handleEntered(CharacterManager mgr)
Figures out which end to send the character to, based on which end
they're on right now, and moves the character.
|
public SimpleConnector(Level level1, int level1X, int level1Y, Level level2, int level2X, int level2Y)
SimpleConnector.level1 - a levellevel1X - the x-coord on the first levellevel1Y - the y-coord on the first levellevel2 - another levellevel2X - the x-coord on the second levellevel2Y - the y-coord on the second levelpublic boolean enteredConnection(CharacterManager mgr)
enteredConnection in interface Connectormgr - the character's managerprotected void handleEntered(CharacterManager mgr)
mgr - the character's managerCopyright © 2013. All Rights Reserved.