gizmoball.gameworld.triggers
Class SetColorTrigger

java.lang.Object
  extended by gizmoball.gameworld.triggers.SetColorTrigger
All Implemented Interfaces:
Trigger

public class SetColorTrigger
extends java.lang.Object
implements Trigger

A trigger that makes the other object the same color as the trigger object.


Constructor Summary
SetColorTrigger()
           
 
Method Summary
 java.util.List<Gizmo> getAssociatedGizmos()
          A SetColorTrigger has no associated gizmos.
 double priority()
          The priority of this trigger.
 void run(GameObject triggerObject, GameObject otherObject, GameObject triggerObjectCopy, GameObject otherObjectCopy)
          Sets the other object to the color of the trigger object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SetColorTrigger

public SetColorTrigger()
Method Detail

priority

public double priority()
Description copied from interface: Trigger
The priority of this trigger. Higher priority means that the effects of this trigger are more important, and will overwrite effects of lower-priority triggers.

Specified by:
priority in interface Trigger
Returns:
this.priority

run

public void run(GameObject triggerObject,
                GameObject otherObject,
                GameObject triggerObjectCopy,
                GameObject otherObjectCopy)
Sets the other object to the color of the trigger object

Specified by:
run in interface Trigger
Parameters:
triggerObject - the GameObject that is linked to this trigger
otherObject - the other GameObject that was involved in this event
triggerObjectCopy - a copy that should be modified
otherObjectCopy - a copy that should be modified

getAssociatedGizmos

public java.util.List<Gizmo> getAssociatedGizmos()
A SetColorTrigger has no associated gizmos.

Specified by:
getAssociatedGizmos in interface Trigger
Returns:
the gizmos that this has an internal reference to