Package megamek.server.trigger
Class SpecificRoundEndTrigger
java.lang.Object
megamek.server.trigger.SpecificRoundEndTrigger
- All Implemented Interfaces:
Trigger
This Trigger reacts at the end of the specified game round. This is more or less the same as a RoundStartTrigger
of the following round, but this can be used to trigger something without actually entering the following
round just yet (e.g. ending the game at the end of round 10 instead of at the beginning of round 11).
Note that this Trigger can react multiple times!
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
isTriggered
(IGame game, TriggerSituation event) Returns true when this Trigger is triggered, i.e.toString()
-
Constructor Details
-
SpecificRoundEndTrigger
public SpecificRoundEndTrigger(int round)
-
-
Method Details
-
isTriggered
Description copied from interface:Trigger
Returns true when this Trigger is triggered, i.e. if the prerequisites for its associated event are deemed to be satisfied. Note that the event is itself responsible for making sure that it only returns true once, if it should only trigger once. If it returns true on multiple occasions, the triggered event may happen multiple times. The given TriggerEvent specifies when at what moment of the game this method is called.- Specified by:
isTriggered
in interfaceTrigger
- Parameters:
game
- The gameevent
- The type of event that caused the trigger to be called- Returns:
- True when this Trigger considers itself triggered, false otherwise
-
toString
-