public ActionAnim GetActionStep(ref int index) { if (index == 0 || comboSteps.Count == 0) { if (comboSteps.Count == 0) { index = 0; } else { index++; } return(firstStep); } if (index > comboSteps.Count - 1) { index = 0; } else { index++; } ActionAnim retVal = comboSteps[index]; return(retVal); }
public ActionInput GetFirstInput() { if (firstStep == null) { firstStep = new ActionAnim(); } return(firstStep.input); }
public static void DeepCopyStepsList(Action from, Action to) { for (int i = 0; i < from.comboSteps.Count; i++) { ActionAnim a = new ActionAnim(); a.input = from.comboSteps[i].input; a.targetAnim = from.comboSteps[i].targetAnim; to.comboSteps.Add(a); } }