Client and backend. This class is shared: the same code is compiled into your app and into your server, so everything on this page works in both.

public static final class AIBrain.HealthAtMost

  1. Object
  2. AIBrain.HealthAtMost

ImplementsAIBrain.Decision

Holds while the actor’s health is at or below a value.

Constructors

public HealthAtMost(int hp)A health check, for a boss changing phase.

Methods

public boolean decide(AIBrain brain, Actor self, PlatformWorld world)Whether the transition should fire.

Inherited methods

Constructor details

HealthAtMost

public HealthAtMost(int hp)
A health check, for a boss changing phase.

Parameters

hp int
the threshold

Method details

decide

public boolean decide(AIBrain brain, Actor self, PlatformWorld world)
Whether the transition should fire.

Parameters

brain AIBrain
the brain
self Actor
the actor
world PlatformWorld
the world

Returns

true to switch