/// <summary> /// Called each time an action is completed. /// </summary> /// <param name="action">Action.</param> public void AnActionIsDone(ActionOverTime action) { // Reset the action when it is over. ActionList[CurrentAction].Reset(); if (CurrentAction >= ActionList.Count - 1) { CurrentAction = 0; RepeatCount--; } else { CurrentAction++; } RunAction(); }
/// <summary> /// Called by an action when it's done. /// Will remove itself from the dictionary. /// Can be override but don't forget to call the base(). /// </summary> /// <param name="action">Action.</param> /// <param name="args">Argument.</param> public virtual void ActionDone(ActionOverTime action, Object args) { action.Stop(); ActionsOverTimeToRemove.Add(action); }
/// <summary> /// Performs the action. /// </summary> /// <param name="action">Action.</param> public virtual void PerformAction(ActionOverTime action) { ActionsOverTimeToActivate.Add(action); }