public interface Level
extends com.sun.sgs.app.ManagedObject
Dungeon.| Modifier and Type | Field and Description |
|---|---|
static String |
NAME_PREFIX
The standard name prefix for all levels.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCharacter(CharacterManager mgr)
Adds a character to this level at some random point.
|
boolean |
addCharacter(CharacterManager mgr,
int startX,
int startY)
Adds a character to this level at the given location.
|
void |
addItem(Item item)
Adds an item to this level at some random position.
|
void |
addItem(Item item,
int startX,
int startY)
Adds an item to this level at the given position.
|
Board |
getBoardSnapshot()
Returns a snapshot (ie, static) view of the level.
|
String |
getName()
Returns the name of this level.
|
boolean |
move(CharacterManager mgr,
KeyMessages.Type direction)
Tries to move the given character in the given direction
|
void |
removeCharacter(CharacterManager mgr)
Removes a character from the level.
|
boolean |
take(CharacterManager mgr)
Tries to take items at the character's current location.
|
static final String NAME_PREFIX
String getName()
void addCharacter(CharacterManager mgr)
mgrRef - a reference to the CharacterManager who's
Character is joining this Levelboolean addCharacter(CharacterManager mgr, int startX, int startY)
mgrRef - a reference to the CharacterManager who's
Character is joining this LevelstartX - the starting x-coordinatestartY - the starting y-coordinatevoid removeCharacter(CharacterManager mgr)
mgrRef - a reference to the CharacterManager who's
Character is joining this Levelvoid addItem(Item item)
itemRef - a reference to the Itemvoid addItem(Item item, int startX, int startY)
itemRef - a reference to the ItemstartX - the starting x-coordinatestartY - the starting y-coordinateBoard getBoardSnapshot()
boolean move(CharacterManager mgr, KeyMessages.Type direction)
mgr - the manager for the Character that is trying
to movedirection - the direction in which the character wants to moveboolean take(CharacterManager mgr)
mgr - the manager for the Character that is trying
to take the itemsCopyright © 2013. All Rights Reserved.