public static void AddUndo(UndoDelegate dgtUndo, object[] aobArgs) { if (s_fGrouping) s_cElements++; s_stk.Push(aobArgs); s_stk.Push(dgtUndo); }
public void AddGauge(int gauge, UndoDelegate undoDelegate) { nowGauge += gauge; if (nowGauge >= MAX_GAUGE) { nowGauge = MAX_GAUGE; StartCoroutine(ThrownOut(undoDelegate)); } }
public static void AddUndo(UndoDelegate dgtUndo, object[] aobArgs) { if (s_fGrouping) { s_cElements++; } s_stk.Push(aobArgs); s_stk.Push(dgtUndo); }
/// <summary> /// Same as PushAndDo(desc, redo, undo) but also calls the specified UpdateDelegate after /// both the undo and redo operation. /// /// This is to avoid code duplication if some UI elements needs to be updated in either case. /// </summary> /// <param name="description"></param> /// <param name="redo"></param> /// <param name="undo"></param> /// <param name="update"></param> public void PushAndDo(String description, RedoDelegate redo, UndoDelegate undo, UpdateDelegate update) { PushAndDo(description, () => { redo(); update(); }, () => { undo(); update(); }); }
/// <summary> /// Same as PushAndDo(desc, redo, undo) but also calls the specified UpdateDelegate after /// both the undo and redo operation. /// /// This is to avoid code duplication if some UI elements needs to be updated in either case. /// </summary> /// <param name="description"></param> /// <param name="redo"></param> /// <param name="undo"></param> /// <param name="update"></param> public void PushAndDo(String description, RedoDelegate redo, UndoDelegate undo, UpdateDelegate update) { PushAndDo(description, () => { redo(); update(); }, () => { undo(); update(); }); }
/// <summary> /// Create an entry on the undo stack with the given delegates to undo and redo the operation. /// /// Calls the "redo" delegate once. /// </summary> /// <param name="description">UI text, keep brief.</param> /// <param name="undo"></param> /// <param name="redo"></param> public void PushAndDo(String description, RedoDelegate redo, UndoDelegate undo) { if (_cursor == _stack.Count) { _stack.Add(new UndoStackEntry()); } var entry = _stack[_cursor]; entry.Description = description; entry.Redo = redo; entry.Undo = undo; redo(); ++_cursor; }
/// <summary> /// Create an entry on the undo stack with the given delegates to undo and redo the operation. /// /// Calls the "redo" delegate once. /// </summary> /// <param name="description">UI text, keep brief.</param> /// <param name="undo"></param> /// <param name="redo"></param> public void PushAndDo(String description, RedoDelegate redo, UndoDelegate undo) { if (_cursor == _stack.Count) { _stack.Add(new UndoStackEntry()); } var entry = _stack[_cursor]; entry.Description = description; entry.Redo = redo; entry.Undo = undo; redo(); ++_cursor; }
private IEnumerator ThrownOut(UndoDelegate undoDelegate) { int toLayer = player.OppositeLayer(player.ParentTimeLayer.layerNum); // 다른 레이어로 갈 수 있다면 시간을 바꾸고 // 갈 수 없다면 죽인다 if (player.CanSwitchingTime(toLayer)) { player.DoTimeSwitch(); yield return(StartCoroutine(followUpCamera.DoElasticEffect())); undoDelegate(); } else { player.Dead(true); } }
public void AddElasticityGauge(int gauge, UndoDelegate undoDelegate) { elasticityGaugeManager.AddGauge(gauge, undoDelegate); }