public UnitMove(UnitMove original) { this.unit = (Unit)original.unit.Clone(); this.old = original.old; this.dist = original.dist; this.shift = original.shift; this.comment = original.comment; }
public UnitMove(Unit unit, bool old, decimal dist, decimal shift, string comment) { this.unit = (Unit)unit.Clone(); this.old = old; this.dist = dist; this.shift = shift; this.comment = comment; }
public Unit unit; //отряд, который отображаем в списке #endregion Fields #region Constructors public UnitMove(Unit unit) { this.unit = (Unit)unit.Clone(); this.old = false; this.dist = 0; this.shift = 100; this.comment = "полный ход"; }
public Unit(Unit original) { this.id = original.id; this.name = original.name; this.side = original.side; this.curATB = original.curATB; this.ini = original.ini; //... }
//добавить стек к набору отрядов public void AddAfterFirst(Unit unit, int delta) { State state = CurrentState; unit = (Unit)unit.Clone(); if (state.Units.Count > 0) { state.Top(); Unit first = state.Units[state.FirstIndex()]; unit.curATB = first.curATB - delta; } state.Units.Add(unit); CurrentState = state; }
//добавить стек к набору отрядов public void Add(Unit unit) { State state = CurrentState; state.Units.Add((Unit)unit.Clone()); CurrentState = state; }