protected override void Update(GameTime gameTime) { base.Update(gameTime); if (mState == GameState.Closing) { Exit(); } if (mState == GameState.Starting) { Camera c = new Camera(mWorld, new Vector2(1, 2)); c.Position = new Rectangle(0, 0, 512, 768); c.Initialise(); mMainScreen.AddScreen(c); mWorld.AddObject(c); Camera c2 = new Camera(mWorld, Vector2.Zero); c2.Position = new Rectangle(512, 0, 512, 768); c2.Initialise(); mMainScreen.AddScreen(c2); mWorld.AddObject(c2); mMainMenue.Focus = false; mMainScreen.Remove(mMainMenue); mState = GameState.Run; } mInputProcessor.Update(gameTime); }
public void LoadMenue(AbstractMenue m) { m.Initialise(); mScreen.AddScreen(m); m.Focus = true; mInput.AddClick(m); mInput.AddPress(m); }