Пример #1
0
        /// <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();
        }
Пример #2
0
		/// <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);
		}
Пример #3
0
		/// <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();
		}
Пример #4
0
		/// <summary>
		/// Performs the action.
		/// </summary>
		/// <param name="action">Action.</param>
		public virtual void PerformAction(ActionOverTime action)
		{
			ActionsOverTimeToActivate.Add(action);
		}