コード例 #1
0
ファイル: Actor.cs プロジェクト: Unknownow/item-shooter
 /// <summary>
 /// Stopes and removes the given action.
 /// </summary>
 public void RemoveAction(ActionInstant targetAction)
 {
     if (targetAction.running)
     {
         targetAction.Stop();
     }
 }
コード例 #2
0
ファイル: Actor.cs プロジェクト: Unknownow/item-shooter
 /// <summary>
 /// Attaches and starts the action.
 /// </summary>
 public void AttachAction(ActionInstant targetAction)
 {
     targetAction.SetActor(this);
     targetAction.Start();
     if (targetAction.running)
     {
         actionsToAdd.Add(targetAction);
     }
 }
コード例 #3
0
ファイル: Actor.cs プロジェクト: Unknownow/item-shooter
 /// <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);
         }
     }
 }