public ActionInput GetFirstInput() { if (firstStep == null) { firstStep = new ActionAnimation(); } return(firstStep.input); }
public static void DeepCopyStepsList(Action from, Action to) { to.comboSteps = new List <ActionAnimation>(); for (int i = 0; i < from.comboSteps.Count; i++) { ActionAnimation a = new ActionAnimation(); a.input = from.comboSteps[i].input; a.targetAnim = from.comboSteps[i].targetAnim; to.comboSteps.Add(a); } }
public ActionAnimation GetActionSteps(ref int index) { if (index == 0) { if (comboSteps.Count == 0) { index = 0; } else { //Even if you dont have combo steps index++; } return(firstStep); } if (comboSteps != null) { if (index - 1 < comboSteps.Count - 1) { Debug.Log("Action step index: " + index); ActionAnimation retVal = comboSteps[index - 1]; index++; if (index > comboSteps.Count - 1) { index = 0; } return(retVal); } else { return(firstStep); } } else { return(firstStep); } }