示例#1
0
文件: World.cs 项目: SilovYan/Warxels
 public void AddUnit(UnitBase unit)
 {
     _army.Add(unit);
 }
示例#2
0
文件: World.cs 项目: SilovYan/Warxels
 public void MoveUnit(UnitBase unit, int y, int x)
 {
     _army.Move(unit, y, x);
 }
示例#3
0
 public Army(params IUnit[] units)
 {
     _units = units.ToDictionary(o => UnitBase.GetPositionKey(o.Y, o.X));
 }
示例#4
0
文件: World.cs 项目: SilovYan/Warxels
 public void ApplyDamage(UnitBase unit, int damageValue)
 {
     unit.ApplyDamage(damageValue);
 }
示例#5
0
        public void Remove(IUnit unit)
        {
            var key = UnitBase.GetPositionKey(unit.Y, unit.X);

            _units.Remove(key);
        }