コード例 #1
0
ファイル: Game1.cs プロジェクト: flabbergasted/fitzbooch-tbs
        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
ファイル: Armor.cs プロジェクト: flabbergasted/fitzbooch-tbs
 public Armor(Metal mt)
 {
     _metal = mt;
 }
コード例 #3
0
ファイル: Armor.cs プロジェクト: flabbergasted/fitzbooch-tbs
 public Armor()
 {
     _metal = new Metal();
 }
コード例 #4
0
ファイル: Weapon.cs プロジェクト: flabbergasted/fitzbooch-tbs
 public Weapon(WeaponType wt, Metal mt)
 {
     _weaponType = wt;
     _metal = mt;
     AssignChargeStop(wt);
 }
コード例 #5
0
ファイル: Weapon.cs プロジェクト: flabbergasted/fitzbooch-tbs
 public Weapon(WeaponType wt)
 {
     _weaponType = wt;
     _metal = new Metal();
     AssignChargeStop(wt);
 }
コード例 #6
0
ファイル: Weapon.cs プロジェクト: flabbergasted/fitzbooch-tbs
 public Weapon()
 {
     _weaponType = WeaponType.None;
     _metal = new Metal();
 }