public static Battle PathFinding() { Battle battle = new Battle(); battle.GameMap = Maps.PathFinder(); return battle; }
public static void Initialize(Game game) { // Setup Buffer MapBuffer = new RenderTarget2D(game.GraphicsDevice, UI.GameView.Width, UI.GameView.Height); CollisionBuffer = new RenderTarget2D(game.GraphicsDevice, UI.GameView.Width, UI.GameView.Height); // Initialize player variables Player.HP.Max = 10; Player.MP.Max = 10; Player.AP.Max = 2; Player.Initialize(); Player.TextureName = "Player"; Player.Bounds.X =3*64; Player.Bounds.Y = 3 * 64; // Setup Opponent // Setup Battle CurrentBattle = Templates.Battles.DefaultBattle(); CurrentBattle.Player = Player; // Events registration GameStart += Engine_GameStart; RoundStart += Engine_RoundStart; PlayerTurnStart += Engine_PlayerTurnStart; PlayerTurnEnd += Engine_PlayerTurnEnd; OpponentTurnStart += Engine_OpponentTurnStart; OpponentTurnEnd += Engine_OpponentTurnEnd; RoundEnd += Engine_RoundEnd; GameEnd += Engine_GameEnd; GameStateChange += Engine_GameStateChange; // Start game GameStart(null, e); }
public static Battle DefaultBattle() { Battle battle = new Battle(); battle.GameMap = Maps.DefaultMap(); battle.Creatures.Add(Creatures.Goblin(3, 4)); battle.Creatures.Add(Creatures.Goblin(4, 5)); battle.Creatures.Add(Creatures.Goblin(5, 4)); battle.Creatures.Add(Creatures.Goblin(5, 7)); battle.Creatures.Add(Creatures.Goblin(8, 2)); return battle; }