gizmoball.gameworld.triggers
Class NoCollisionTrigger

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

public class NoCollisionTrigger
extends java.lang.Object
implements Trigger

A trigger that reverses the effects of any collision on a ball.


Constructor Summary
NoCollisionTrigger()
           
 
Method Summary
 java.util.List<Gizmo> getAssociatedGizmos()
          NoCollisionTrigger has no associated gizmos.
 double priority()
          This should be run after other collision triggers.
 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

NoCollisionTrigger

public NoCollisionTrigger()
Method Detail

getAssociatedGizmos

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

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

priority

public double priority()
This should be run after other collision triggers.

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

run

public void run(GameObject triggerObject,
                GameObject otherObject,
                GameObject triggerObjectCopy,
                GameObject otherObjectCopy)
Description copied from interface: Trigger
Runs this trigger. Reads from the first two arguments, writes to the second two arguments.

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
Effects:
restores original state before collision