public void Do(IManagedAction action, bool preventDoCall = false) { ClampActionsAfter(Index); actions.Add(action); Index = actions.Count - 1; if (preventDoCall == false) { action.Do(); } EventManager.Dispatch(new OnRegisterManagedActionEvent() { ManagedAction = action }); }
public void Repeat() { if (actions.Count == 0) { return; } if (actions[Index] is IRepeatableManagedAction repeatable) { ClampActionsAfter(Index); IManagedAction clone = repeatable.Clone(); Do(clone); EventManager.Dispatch(new OnRepeatManagedActionEvent() { PrototypeAction = repeatable, ClonedAction = clone }); } }