public boolean act (float delta) { if (complete) return true; complete = true; Pool pool = getPool(); setPool(null); // Ensure this action can't be returned to the pool while executing. try { Array<Action> actions = this.actions; for (int i = 0, n = actions.size; i < n && actor != null; i++) { Action currentAction = actions.get(i); if (currentAction.getActor() != null && !currentAction.act(delta)) complete = false; if (actor == null) return true; // This action was removed. } return complete; } finally { setPool(pool); } }
public boolean act (float delta) { if (complete) return true; complete = true; Pool pool = getPool(); setPool(null); // Ensure this action can't be returned to the pool while executing. try { Array<Action> actions = this.actions; for (int i = 0, n = actions.size; i < n && actor != null; i++) { Action currentAction = actions.get(i); if (currentAction.getActor() != null && !currentAction.act(delta)) complete = false; if (actor == null) return true; // This action was removed. } return complete; } finally { setPool(pool); } }
public boolean act (float delta) { if (complete) return true; complete = true; Pool pool = getPool(); setPool(null); // Ensure this action can't be returned to the pool while executing. try { Array<Action> actions = this.actions; for (int i = 0, n = actions.size; i < n && actor != null; i++) { Action currentAction = actions.get(i); if (currentAction.getActor() != null && !currentAction.act(delta)) complete = false; if (actor == null) return true; // This action was removed. } return complete; } finally { setPool(pool); } }