Example #1
0
    @Override
    public void update(Actor actor) {
      super.update(actor);

      // update the base animation
      Animation base = getBase((Mobile) actor);
      if (base != null && !base.isPlaying()) {
        base.start();
      }
    }
Example #2
0
    @Override
    public void update(Actor actor) {
      super.update(actor);

      // update the state animation
      EntryState estate = (EntryState) actor;
      int entered = estate.getStateEntered();
      if (entered > _lastStateEntered) {
        int state = estate.getState();
        Animation anim = (_states != null && state < _states.length) ? _states[state] : null;
        if (anim != null) {
          anim.start();
          anim.tick((_view.getDelayedTime() - entered) / 1000f);
        }
        _lastStateEntered = entered;
      }
    }