示例#1
0
文件: Tile.cs 项目: Bulltrick/DBGame
 public Tile(int map, int x, int y, int owner, Terrain ter, Construction con, City city, Army arm)
 {
     MapID = map;
     this.TileX = x;
     this.TileY = y;
     Terrain = ter;
     //foliage = fol;
     Construction = con;
     this.City = city;
     Army = arm;
     PlayerID = owner;
 }
示例#2
0
文件: Army.cs 项目: Bulltrick/DBGame
 public void Attack(Army target)
 {
     foreach (Unit a in Unit)
     {
         foreach (Unit t in target.Unit)
         {
             if (a.UnitRanged)
             {
                 if (target.ArmyBacklineProtected && t.UnitPosition == 2) a.Rattack(t);
                 else if (t.UnitPosition == 1) a.Rattack(t);
             }
             else
             {
                 if (target.ArmyBacklineProtected && t.UnitPosition == 2) a.attack(t);
                 else if (t.UnitPosition == 1) a.attack(t);
             }
         }
     }
 }
示例#3
0
文件: Tile.cs 项目: Bulltrick/DBGame
 public Tile(int map, int x, int y, int owner, Terrain ter, Construction con, City city, Army arm)
 {
     MapID      = map;
     this.TileX = x;
     this.TileY = y;
     Terrain    = ter;
     //foliage = fol;
     Construction = con;
     this.City    = city;
     Army         = arm;
     PlayerID     = owner;
 }