/// <summary> /// Stopes and removes the given action. /// </summary> public void RemoveAction(ActionInstant targetAction) { if (targetAction.running) { targetAction.Stop(); } }
/// <summary> /// Attaches and starts the action. /// </summary> public void AttachAction(ActionInstant targetAction) { targetAction.SetActor(this); targetAction.Start(); if (targetAction.running) { actionsToAdd.Add(targetAction); } }
/// <summary> /// Sets the timescale for current action. /// </summary> public void SetTimeScale(float ts) { for (int i = 0; i < actions.Count; i++) { ActionInstant action = actions[i]; if (action is ActionInterval) { ((ActionInterval)action).SetTimeScale(ts); } } }