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); }
public Cheater(ScoreTracker st, MarioUI ui, Game1 Game) { game = Game; score = st; UI = ui; prevkb = Keyboard.GetState(); prevpad = GamePad.GetState(PlayerIndex.One); konamiKeys = new Collection <Keys> { Keys.Up, Keys.Up, Keys.Down, Keys.Down, Keys.Left, Keys.Right, Keys.Left, Keys.Right, Keys.B, Keys.A }; konamiButtons = new Collection <Buttons> { Buttons.DPadUp, Buttons.DPadUp, Buttons.DPadDown, Buttons.DPadDown, Buttons.DPadLeft, Buttons.DPadRight, Buttons.DPadLeft, Buttons.DPadRight, Buttons.B, Buttons.A }; }