/// <summary> /// Kill the current action instance /// </summary> public void Kill() { if (curActionInstance_ == null) { return; } curActionInstance_.Kill(); curActionInstance_ = null; }
/// <summary> /// Complete the current action instance /// </summary> public void Complete() { if (curActionInstance_ == null) { return; } curActionInstance_.Complete(); curActionInstance_ = null; }
/// <summary> /// Play loaded action instance, or load and play it if there is no loaded action instance /// </summary> /// <returns>Current action instance</returns> public ActionInstance Play(UpdateType updateType) { if (loadedActionInstance_ == null) { Load(); } curActionInstance_ = loadedActionInstance_; loadedActionInstance_ = null; return(curActionInstance_.Play(updateType)); }
/// <summary> /// Preload action instance for performance purpose /// </summary> public void Load() { loadedActionInstance_ = null; var action = CreateAction(null); if (action != null) { loadedActionInstance_ = action.Enqueue(); } else { Debug.LogErrorFormat("Can't create an action from '{0}'" + __assignedScriptName); } }
public ActionInstance Enqueue(ActionBase action, ActionInstance recycleInstance = null) { var actionInstance = recycleInstance; if (actionInstance == null) { actionInstance = new ActionInstance(); } else { actionInstance._Recycle(); } actionInstance._SetAction(action); playingInstances_.Add(actionInstance); return(actionInstance); }
public static ActionInstance EnqueueAsForever(this ActionBase action, ActionInstance recycleInstance = null) { return(GetForeverInstance().Enqueue(action, recycleInstance)); }
public static ActionInstance Enqueue(this ActionBase action, ActionInstance recycleInstance = null) { return(GetSceneInstance().Enqueue(action, recycleInstance)); }
public static ActionInstance PlayFixed(this ActionBase action, ActionInstance recycleInstance = null) { return(action.Enqueue(recycleInstance).Play(UpdateType.FIXED)); }
public static ActionInstance PlayUnscaled(this ActionBase action, ActionInstance recycleInstance = null) { return(action.Enqueue(recycleInstance).Play(UpdateType.UNSCALED)); }
public WaitForActionInstance(ActionInstance instance) { actionInstance_ = instance; }