|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgizmoball.gameworld.triggers.ToggleColorTrigger
public class ToggleColorTrigger
A Trigger that toggles the color of a ToggleGizmo depending on its state.
onColor
: Color // the color when the ToggleGizmo is on
offColor
: Color // the color when the ToggleGizmo is off
gizmo
: ToggleGizmo // the gizmo that is colored
Constructor Summary | |
---|---|
ToggleColorTrigger(java.awt.Color onColor,
java.awt.Color offColor,
ToggleGizmo gizmo)
|
Method Summary | |
---|---|
java.util.List<Gizmo> |
getAssociatedGizmos()
Gets all the gizmos that are associated with this trigger; ie all the gizmos that this trigger must keep an internal reference to. |
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 ToggleColorTrigger(java.awt.Color onColor, java.awt.Color offColor, ToggleGizmo gizmo)
onColor
- the color when gizmo is onoffColor
- the color when gizmo is offgizmo
- the underlying gizmoMethod Detail |
---|
public java.util.List<Gizmo> getAssociatedGizmos()
Trigger
getAssociatedGizmos
in interface Trigger
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 modified
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |