|
|||||||||
| 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.RectTriggerArea
public class RectTriggerArea
This class represents a rectangular trigger area.
| Constructor Summary | |
|---|---|
RectTriggerArea(java.lang.String scriptId,
float x,
float z,
float width,
float length)
Creates a new rectangular trigger area with no candidates for firering the trigger initially assigned. |
|
RectTriggerArea(java.lang.String scriptId,
float x,
float z,
float width,
float length,
AbstractCharacter c)
Creates a new rectangular trigger area with the specified character as the only one that can fire the trigger. |
|
RectTriggerArea(java.lang.String scriptId,
float x,
float z,
float width,
float length,
java.util.List<AbstractCharacter> candiates)
Creates a new rectangular 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 |
getLength()
Returns the length of the trigger area. |
float |
getWidth()
Returns the width of the trigger area. |
boolean |
isCandiateOnTrigger()
Determines if at least one candiate character is within the trigger area. |
void |
setLength(float length)
Sets a new length for the trigger area. |
void |
setWidth(float width)
Sets a new width 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 RectTriggerArea(java.lang.String scriptId,
float x,
float z,
float width,
float length)
scriptId - id for reference purposes in script filesx - x-coordinate of the trigger centerz - z-coordinate of the trigger centerwidth - width of the trigger reactanglelength - height of the trigger reactangle
public RectTriggerArea(java.lang.String scriptId,
float x,
float z,
float width,
float length,
AbstractCharacter c)
scriptId - id for reference purposes in script filesx - x-coordinate of the trigger centerz - z-coordinate of the trigger centerwidth - width of the trigger rectanglelength - height of the trigger reactanglec - only character that can fire the trigger
public RectTriggerArea(java.lang.String scriptId,
float x,
float z,
float width,
float length,
java.util.List<AbstractCharacter> candiates)
scriptId - id for reference purposes in script filesx - x-coordinate of the trigger centerz - z-coordinate of the trigger centerwidth - width of the trigger rectanglelength - length of the trigger reactanglecandiates - candiates for firering the trigger| Method Detail |
|---|
public float getWidth()
public void setWidth(float width)
width - new width for the triggerpublic float getLength()
public void setLength(float length)
length - new length 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 | ||||||||