|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.rico.adventure.script.trigger.AbstractTrigger
de.rico.adventure.script.trigger.CircleTriggerArea
public class CircleTriggerArea
This class represents a circular trigger area.
Constructor Summary | |
---|---|
CircleTriggerArea(java.lang.String scriptId,
float x,
float z,
float radius)
Creates a new circular trigger area with no candidates for firering the trigger initially assigned. |
|
CircleTriggerArea(java.lang.String scriptId,
float x,
float z,
float radius,
AbstractCharacter c)
Creates a new circular trigger area with the specified character as the only one that can fire the trigger. |
|
CircleTriggerArea(java.lang.String scriptId,
float x,
float z,
float radius,
java.util.List<AbstractCharacter> candiates)
Creates a new circular trigger area with the specified list of characters that can fire the trigger. |
Method Summary | |
---|---|
void |
draw(javax.media.opengl.GL gl)
Draws the trigger area to the ground. |
float |
getRadius()
Returns the radius of the trigger area. |
boolean |
isCandiateOnTrigger()
Determines if at least one candiate character is within the trigger area. |
void |
setRadius(float radius)
Sets a new radius for the trigger area. |
void |
update(long elapsedTime)
This method updates the special things of the circular trigger area and calls the update() method of the super class AbstractTrigger.update(long) , too. |
Methods inherited from class de.rico.adventure.script.trigger.AbstractTrigger |
---|
addCandidate, getCandidates, getColor, getScriptId, getX, getZ, hasBeenCalledEnterMethod, hasBeenCalledExitMethod, isEnabled, removeCandidate, setCalledEnterMethod, setCalledExitMethod, setColor, setEnabled, setPosition, setScriptId, setX, setZ |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CircleTriggerArea(java.lang.String scriptId, float x, float z, float radius)
scriptId
- id for reference purposes in script filesx
- x-coordinate of the trigger centerz
- z-coordinate of the trigger centerradius
- radius of the trigger circlepublic CircleTriggerArea(java.lang.String scriptId, float x, float z, float radius, AbstractCharacter c)
scriptId
- id for reference purposes in script filesx
- x-coordinate of the trigger centerz
- z-coordinate of the trigger centerradius
- radius of the trigger circlec
- only character that can fire the triggerpublic CircleTriggerArea(java.lang.String scriptId, float x, float z, float radius, java.util.List<AbstractCharacter> candiates)
scriptId
- id for reference purposes in script filesx
- x-coordinate of the trigger centerz
- z-coordinate of the trigger centerradius
- radius of the trigger circlecandiates
- candiates for firering the triggerMethod Detail |
---|
public float getRadius()
public void setRadius(float radius)
radius
- new radius for the triggerpublic boolean isCandiateOnTrigger()
AbstractTrigger
isCandiateOnTrigger
in class AbstractTrigger
public void draw(javax.media.opengl.GL gl)
AbstractTrigger
draw
in class AbstractTrigger
public void update(long elapsedTime)
AbstractTrigger.update(long)
, too.
update
in class AbstractTrigger
elapsedTime
- time between two frames
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |