|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectlocation.Hotspot
location.LocationExit
public class LocationExit
This class represents an exit from a game location
| Constructor Summary | |
|---|---|
LocationExit(java.lang.String name,
java.lang.String bshName,
double x,
double y,
int width,
int height,
double newX,
double newY,
boolean usable,
GameLocation start,
GameLocation dest,
com.golden.gamedev.engine.BaseInput bsInput)
|
|
| Method Summary | |
|---|---|
java.lang.String |
getBshName()
Return the beanshell name of this location exit |
GameLocation |
getDestinationLocation()
Returns the location to which the location exit leads to. |
GameLocation |
getStartLocation()
Returns the location from which the exit leads to new location. |
boolean |
isInRange(AbstractCharacterSprite character)
Determines whether the exit is in range for a character |
boolean |
isNotedForUse()
Returns whether the exit is noted for use |
boolean |
isUsable()
Determines whether the exit can be used |
void |
setNotedForUse(boolean use)
Sets whether the exit was noted for use by the player |
void |
setUsable(boolean usable)
Sets if the exit can be used |
void |
use(AbstractCharacterSprite character)
Call this method to signal that the character wants to make a transition from this exit's start location to its destination location. |
| Methods inherited from class location.Hotspot |
|---|
getHeight, getName, getWidth, getX, getY, isMouseOverHotspot, isMouseOverInventHotspot, isPointInHotspot, isPointInInventHotspot, render, setHeight, setName, setWidth, setX, setY, showName, update |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LocationExit(java.lang.String name,
java.lang.String bshName,
double x,
double y,
int width,
int height,
double newX,
double newY,
boolean usable,
GameLocation start,
GameLocation dest,
com.golden.gamedev.engine.BaseInput bsInput)
name - name of the location exitbshName - beanshell name for the location exitx - x-coordinatey - y-coordinatewidth - width of the location exitheight - height of the location exitnewX - new x-coordinate for the playernewY - new y-coordinate for the playerusable - determines if the exit can be initially usedstart - game location the player can leave with the exit (start location)dest - game location to which the exit leads to (destination)bsInput - | Method Detail |
|---|
public java.lang.String getBshName()
public GameLocation getStartLocation()
public GameLocation getDestinationLocation()
public boolean isUsable()
public void setUsable(boolean usable)
usable - is exit usable? true=yes, false=nopublic void setNotedForUse(boolean use)
use - use the exit? true=yes, false=nopublic boolean isNotedForUse()
public boolean isInRange(AbstractCharacterSprite character)
character - character that is checked for the range to the exit
public void use(AbstractCharacterSprite character)
character - character that uses the exit
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||