示例#1
0
 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;
 }
示例#2
0
 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;
 }
示例#3
0
        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 = "полный ход";
        }
示例#4
0
        public Unit(Unit original)
        {
            this.id = original.id;
            this.name = original.name;
            this.side = original.side;

            this.curATB = original.curATB;
            this.ini = original.ini;

            //...
        }
示例#5
0
        //добавить стек к набору отрядов
        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;
        }
示例#6
0
        //добавить стек к набору отрядов
        public void Add(Unit unit)
        {
            State state = CurrentState;

            state.Units.Add((Unit)unit.Clone());

            CurrentState = state;
        }