コード例 #1
0
 void RemoveAction(IP_Action action)
 {
     if (targetSequence.m_Actions.Contains(action))
     {
         targetSequence.m_Actions.Remove(action);
     }
 }
コード例 #2
0
 void MoveActionDown(IP_Action action, int index)
 {
     if (index != targetSequence.m_Actions.Count - 1 && action != null)
     {
         targetSequence.m_Actions.RemoveAt(index);
         index++;
         targetSequence.m_Actions.Insert(index, action);
     }
 }
コード例 #3
0
 void MoveActionUp(IP_Action action, int index)
 {
     if (index != 0 && action != null)
     {
         targetSequence.m_Actions.RemoveAt(index);
         index--;
         targetSequence.m_Actions.Insert(index, action);
     }
 }
コード例 #4
0
 public void CompletedSequence()
 {
     Debug.Log("Completed Sequence");
     completed     = true;
     currentAction = null;
     if (OnSequenceComplete != null)
     {
         OnSequenceComplete.Invoke();
     }
 }
コード例 #5
0
 public void NextAction()
 {
     currentActionID++;
     if (currentActionID > m_Actions.Count - 1)
     {
         CompletedSequence();
     }
     else if (currentActionID >= 0 && currentActionID <= m_Actions.Count - 1)
     {
         currentAction = m_Actions[currentActionID];
         if (currentAction != null)
         {
             currentAction.StartAction();
         }
     }
 }
コード例 #6
0
 public void ResetSequence()
 {
     currentActionID = 0;
     completed       = false;
     currentAction   = null;
 }
コード例 #7
0
        void AddSimpleAction()
        {
            IP_Action curAction = new IP_Action();

            targetSequence.m_Actions.Add(curAction);
        }