/// <summary> /// Updates all objects in the game world, by first calling HandleInput and then Update. /// </summary> /// <param name="gameTime">An object containing information about the time that has passed.</param> protected override void Update(GameTime gameTime) { HandleInput(); GameStateManager.Update(gameTime); }
protected override void LoadContent() { contentManager = Content; gd = GraphicsDevice; gameWindow = Window; Random = new Random(); inputHelper = new InputHelper(); spriteBatch = new SpriteBatch(GraphicsDevice); gameStateManager = new GameStateManager(); PerspectiveMatrix = Matrix.CreatePerspectiveFieldOfView((float)Math.PI / 4.0f, (float)Screen.X / (float)Screen.Y, NearPlane, FarPlane); rasterizerState = RasterizerState.CullCounterClockwise; //RasterizerState rs = new RasterizerState(); //rs.CullMode = CullMode.CullCounterClockwiseFace; //rs.FillMode = FillMode.WireFrame; //rasterizerState = rs; }
public GameStateManagerTask(GameStateManager mgr) : base("Game State Manager") { myManager = mgr; frequency = 30; }