process method

  1. @override
bool process(
  1. double dt,
  2. GameComponent comp,
  3. BonfireGameInterface game
)
override

Processes this behavior for the current frame.

Returns true when the behavior is finished and the manager should advance to the next behavior, or false to keep running it on the next frame.

Implementation

@override
bool process(double dt, GameComponent comp, BonfireGameInterface game) {
  if (!_hasRun) {
    _hasRun = true;
    action(dt, comp, game);
  }
  return true;
}