|
|||||||||
| 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 circle
public 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 trigger
public 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 trigger| Method Detail |
|---|
public float getRadius()
public void setRadius(float radius)
radius - new radius for the triggerpublic boolean isCandiateOnTrigger()
AbstractTrigger
isCandiateOnTrigger in class AbstractTriggerpublic void draw(javax.media.opengl.GL gl)
AbstractTrigger
draw in class AbstractTriggerpublic void update(long elapsedTime)
AbstractTrigger.update(long), too.
update in class AbstractTriggerelapsedTime - time between two frames
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||