public GameManager(Game1 game, Dictionary <String, Texture2D> spriteSheet, SpriteFont font, SpriteFont header, Sounds sounds) { this.game = game; sprites = spriteSheet; state = GameState.PLAYING; //load room 17 first sound = sounds; roomLoad = new RoomLoader(sprites); rooms.Add("Room17", roomLoad.Load("Room17.txt")); roomKey = "Room17"; player = new Player(spriteSheet["playersheet"], new Vector2(500, 200), spriteSheet["PlayerProjectiles"], sound); hud = new HUD(spriteSheet["hudSheet"], font); itemScreen = new ItemSelectionScreen(spriteSheet["ItemSelection"]); pause = new PauseScreen(spriteSheet["MenuScreens"], font, header); gameOver = new GameOverScreen(spriteSheet["MenuScreens"], font, header); win = new WinScreen(spriteSheet["MenuScreens"]); EPCol = new EnemyProjectileCollisionHandler(this); }
public GameManager(Game1 game, Dictionary <String, Texture2D> spriteSheet, SpriteFont font, SpriteFont header, Sounds sounds) { GameplayConstants.Initialize(1);//initialize constants to normal mode, just at the start so constants are somehting this.game = game; sprites = spriteSheet; state = GameState.START; difficulty = 1; isHordeMode = false; //load room 17 first sound = sounds; roomLoad = new RoomLoader(sprites, this); rooms.Add("Room17", roomLoad.Load("Room17.txt")); roomKey = "Room17"; transitioner = new RoomTransition(); //initialize player player = new Player(spriteSheet["playersheet"], new Vector2(500, 200), spriteSheet["PlayerProjectiles"], sound); //initailize screens hud = new HUD(spriteSheet["hudSheet"], font); itemScreen = new ItemSelectionScreen(spriteSheet["ItemSelection"]); pause = new PauseScreen(spriteSheet["MenuScreens"], font, header); gameOver = new GameOverScreen(spriteSheet["MenuScreens"], font, header); win = new WinScreen(spriteSheet["MenuScreens"]); start = new StartMenuScreen(spriteSheet["StartMenu"], font, header, this); EPCol = new EnemyProjectileCollisionHandler(this); //initailize cheat code dictionary cheatCodes = new Dictionary <string, ICommand>(); //initailize cheat codes ICommand extraHealth = new ExtraHealth(player); ICommand extraRupees = new ExtraRupees(player); ICommand invinc = new Invincibility(player); ICommand bombs = new UnlimitedBombs(player); cheatCodes.Add("NBKJH", extraHealth); cheatCodes.Add("MNBVX", extraRupees); cheatCodes.Add("ZZKNL", invinc); cheatCodes.Add("GFGFG", bombs); //initailize special move code dictionary specialMoves = new Dictionary <string, ICommand>(); //initailize special moves ICommand fireSpin = new FireSpinSpecialMove(this); ICommand reapingArrow = new ReapingArrowSpecialMove(this); ICommand rupeeShied = new RupeeShieldSpecialMove(this); specialMoves.Add("TYHGT", fireSpin); specialMoves.Add("JKJKJ", reapingArrow); specialMoves.Add("KJHGF", rupeeShied); }