void RemoveAction(IP_Action action) { if (targetSequence.m_Actions.Contains(action)) { targetSequence.m_Actions.Remove(action); } }
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); } }
void MoveActionUp(IP_Action action, int index) { if (index != 0 && action != null) { targetSequence.m_Actions.RemoveAt(index); index--; targetSequence.m_Actions.Insert(index, action); } }
public void CompletedSequence() { Debug.Log("Completed Sequence"); completed = true; currentAction = null; if (OnSequenceComplete != null) { OnSequenceComplete.Invoke(); } }
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(); } } }
public void ResetSequence() { currentActionID = 0; completed = false; currentAction = null; }
void AddSimpleAction() { IP_Action curAction = new IP_Action(); targetSequence.m_Actions.Add(curAction); }