|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgizmoball.gameworld.triggers.CounterTrigger
public class CounterTrigger
A CounterTrigger changes a Counter object by some amount each time the GameObject is activated.
change
: integer // the change in score
tally
: Score // the score to change
Constructor Summary | |
---|---|
CounterTrigger(int change,
Counter tally)
Creates a new CounterTrigger with the desired properties |
Method Summary | |
---|---|
java.util.List<Gizmo> |
getAssociatedGizmos()
A CounterTrigger has no associated gizmos |
double |
priority()
The priority of this trigger. |
void |
run(GameObject triggerObject,
GameObject otherObject,
GameObject triggerObjectCopy,
GameObject otherObjectCopy)
Runs this trigger. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CounterTrigger(int change, Counter tally)
change
- tally
- Method Detail |
---|
public double priority()
Trigger
priority
in interface Trigger
public void run(GameObject triggerObject, GameObject otherObject, GameObject triggerObjectCopy, GameObject otherObjectCopy)
Trigger
run
in interface Trigger
triggerObject
- the GameObject that is linked to this triggerotherObject
- the other GameObject that was involved in this eventtriggerObjectCopy
- a copy that should be modifiedotherObjectCopy
- a copy that should be modifiedpublic java.util.List<Gizmo> getAssociatedGizmos()
getAssociatedGizmos
in interface Trigger
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |