/// <summary> /// Create a forever action /// </summary> /// <param name="target">Target.</param> /// <param name="duration">Duration.</param> /// <param name="from">From.</param> /// <param name="to">To.</param> /// <param name="callback">Callback.</param> public static ActionForever Create( ActionBase action ) { return(new ActionForever(action)); }
ActionForever( ActionBase action ) { this._action = action; }
/// <summary> /// Create a forever action /// </summary> /// <param name="target">Target.</param> /// <param name="duration">Duration.</param> /// <param name="from">From.</param> /// <param name="to">To.</param> /// <param name="callback">Callback.</param> public static ActionForever Create( ActionBase action ) { return new ActionForever(action); }
// Remove action of target public void Remove(GameObject target, ActionBase action) { if (this._actions.ContainsKey(target)) this._actions[target].Remove(action); }
/// <summary> /// Add action /// </summary> /// <param name="target">Target which will be used to destory all actions of it.</param> /// <param name="action">Action.</param> public void Add(GameObject target, ActionBase action) { if (!this._actions.ContainsKey(target)) this._actions[target] = new LinkedList<ActionBase>(); this._actions[target].AddLast(action); }