public override void Update(GameTime gameTime, GameScreenManager screenManager, MainGame game)
        {
            //unpause

            menu.Update (prevKeyboardState);

            prevKeyboardState = Keyboard.GetState ();
        }
        public override void Update(GameTime gameTime, GameScreenManager screenManager, MainGame game)
        {
            world.Update (gameTime);
            cameraFollow ();
            camera.Update ();

            if (Keyboard.GetState ().IsKeyDown (Keys.P) && prevKeyboardState.IsKeyUp(Keys.P))
                screenManager.PushGameScreen (new PauseMenuScreen (screenManager, game));
            prevKeyboardState = Keyboard.GetState ();
        }
Esempio n. 3
0
 public override void FinishedLaunching(MonoMac.Foundation.NSObject notification)
 {
     // Handle a Xamarin.Mac Upgrade
     AppDomain.CurrentDomain.AssemblyResolve += (object sender, ResolveEventArgs a) => {
         if (a.Name.StartsWith ("MonoMac")) {
             return typeof(MonoMac.AppKit.AppKitFramework).Assembly;
         }
         return null;
     };
     game = new MainGame ();
     game.Run ();
 }
 public PauseMenuScreen(GameScreenManager _screenManager, MainGame game)
 {
     screenManager = _screenManager;
     prevKeyboardState = Keyboard.GetState ();
     menu = new Menu ((new Vector2(MainGame.WindowWidth*0.5f, MainGame.WindowHeight*0.5f)), "Arial", 20);
     MenuItem menuItem1 = new MenuItem ("Resume");
     menuItem1.Activated += new MenuItem.ActivatedHandler (Option1);
     MenuItem menuItem2 = new MenuItem ("Quit");
     menuItem1.Activated += new MenuItem.ActivatedHandler (Option2);
     menu.AddItem (menuItem1);
     menu.AddItem (menuItem2);
 }
 public void Update(GameTime gameTime, MainGame game)
 {
     //Only update top screen.
     gameScreens.Peek ().Update (gameTime, this, game);
 }
Esempio n. 6
0
 public abstract void Update(GameTime gameTime, GameScreenManager screenManager, MainGame game);
 public override void Update(GameTime gameTime, GameScreenManager screenManager, MainGame game)
 {
     throw new NotImplementedException ();
 }