Class AIBrain.HealthAtMost
java.lang.Object
com.codename1.gaming.platformer.AIBrain.HealthAtMost
- All Implemented Interfaces:
AIBrain.Decision
- Enclosing class:
AIBrain
Holds while the actor's health is at or below a value.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleandecide(AIBrain brain, Actor self, PlatformWorld world) Whether the transition should fire.
-
Constructor Details
-
HealthAtMost
public HealthAtMost(int hp) A health check, for a boss changing phase.
Parameters
hp: the threshold
-
-
Method Details
-
decide
Description copied from interface:AIBrain.DecisionWhether the transition should fire.
Parameters
brain: the brainself: the actorworld: the world
Returns
true to switch
- Specified by:
decidein interfaceAIBrain.Decision
-