gizmoball.gameworld.triggers
Class MissionTrigger

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

public class MissionTrigger
extends java.lang.Object
implements Trigger

A MissionTrigger runs an underlying trigger if activated and resets the activating trigger when done

Specification Fields

Constructor Summary
MissionTrigger(ActivateMissionTrigger activator, GroupTrigger trigger)
           
 
Method Summary
 void activate()
           
 Trigger activateThisTrigger()
           
 void deActivate()
           
 java.util.List<Gizmo> getAssociatedGizmos()
          The trigger list of this is the same as that of the underlying trigger
 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

MissionTrigger

public MissionTrigger(ActivateMissionTrigger activator,
                      GroupTrigger trigger)
Parameters:
activator -
trigger -
Effects:
creates a new MissionTrigger that is activated by activator with underlying trigger Trigger
Method Detail

activateThisTrigger

public Trigger activateThisTrigger()
Returns:
a trigger that activates this

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

getAssociatedGizmos

public java.util.List<Gizmo> getAssociatedGizmos()
The trigger list of this is the same as that of the underlying trigger

Specified by:
getAssociatedGizmos in interface Trigger
Returns:
trigger.associatedGizmos

activate

public void activate()

deActivate

public void deActivate()

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