示例#1
0
        public Game1()
        {
            graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";
            Metal steel = new Metal(MetalType.Steel);
            Unit uUnit1 = new Unit(80, 15, new Weapon(WeaponType.Sword, steel), new Armor(steel));
            Unit uUnit2 = new Unit(80, 15, new Weapon(WeaponType.Axe, steel), new Armor(steel));
            Terrain tt = new Terrain();

            tt.AddNeighboringTerrain(Directions.North, new Terrain());
            tt.AddNeighboringTerrain(Directions.NorthEast, new Terrain(new List<Directions>{Directions.SouthWest, Directions.South}));

            tt.IsDirectionTravelable(Directions.North);
            tt.IsDirectionTravelable(Directions.NorthWest);
            tt.IsDirectionTravelable(Directions.NorthEast);
            tt.IsDirectionTravelable(Directions.South);
            tt.IsDirectionTravelable(Directions.SouthWest);
            tt.IsDirectionTravelable(Directions.SouthEast);
            tt.IsDirectionTravelable(Directions.East);
            tt.IsDirectionTravelable(Directions.West);

            uUnit1.AddOpponent(uUnit2);
            uUnit2.ChargeBonus = true;

            while (true)
            {
            uUnit1.ProcessBattles();
            }
        }
示例#2
0
 public Armor(Metal mt)
 {
     _metal = mt;
 }
示例#3
0
 public Armor()
 {
     _metal = new Metal();
 }
示例#4
0
 public Weapon(WeaponType wt, Metal mt)
 {
     _weaponType = wt;
     _metal = mt;
     AssignChargeStop(wt);
 }
示例#5
0
 public Weapon(WeaponType wt)
 {
     _weaponType = wt;
     _metal = new Metal();
     AssignChargeStop(wt);
 }
示例#6
0
 public Weapon()
 {
     _weaponType = WeaponType.None;
     _metal = new Metal();
 }