Exemplo n.º 1
0
 /**
  * Updates the actor based on time. Typically this is called each frame by {@link
  * Stage#act(float)}.
  *
  * <p>The default implementation calls {@link Action#act(float)} on each action and removes
  * actions that are complete.
  *
  * @param delta Time in seconds since the last frame.
  */
 public void act(float delta) {
   for (int i = 0, n = actions.size; i < n; i++) {
     Action action = actions.get(i);
     if (action.act(delta)) {
       actions.removeIndex(i);
       action.setActor(null);
       i--;
       n--;
     }
   }
 }
Exemplo n.º 2
0
 public void removeAction(Action action) {
   if (actions.removeValue(action, true)) action.setActor(null);
 }
Exemplo n.º 3
0
 public void addAction(Action action) {
   action.setActor(this);
   actions.add(action);
 }