protected override void Initialize() { base.Initialize(); MainCamera = new MarioCamera(GraphicsDevice.Viewport, this); MainCameraObject = MainCamera; UI = new MarioUI(this); UI.Load(Content); finderInit.CollisionInit(); spriteBatch = new SpriteBatch(GraphicsDevice); home = new MainMenu(this); home.Load(Content); cheats = new Cheater(st, UI, this); editor = new LevelEditor(this); changer = new LevelChanger(csvFile, this, spriteBatch); GameReset = new GeneralGameCommands.ChangeLevel(this); mouse = new MouseController(this); pauser = new PauseMenu(this, spriteBatch); pauser.Load(Content); trophy = new Trophies(spriteBatch, this); trophy.Load(); RumbleHelper = new GamepadRumbleHelper(); data = new SaveDataManagement(this); keyboard = new KeyBoard(this); gamepad = new Gamepad(this); }
private void UpdateFireBall() { KeyBoard tempKeyBoard = (KeyBoard)game.keyboard; tempKeyBoard.FireBallLimit = game.objects.Count + 4; game.keyboard = (IController)tempKeyBoard; Gamepad tempGamePad = (Gamepad)game.gamepad; tempGamePad.FireBallLimit = game.objects.Count + 4; game.gamepad = (IController)tempGamePad; }
public void Execute() { KeyBoard tempKeyBoard = (KeyBoard)Game.keyboard; tempKeyBoard.FireBallLimit++; Game.keyboard = (IController)tempKeyBoard; Gamepad tempGamePad = (Gamepad)Game.gamepad; tempGamePad.FireBallLimit++; Game.gamepad = (IController)tempGamePad; MarioSoundBoard.Instance.PlayBowserFire(); IObject bowserFire = ObjectSpriteFactory.Instance.GetBowserFire(); bowserFire.Location = new Vector2(SpawnLocation.X - 10, SpawnLocation.Y + 5); BowserFire bf = (BowserFire)bowserFire; Game.objects.Add(bf); }