Exemplo n.º 1
0
 /// <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);
 }
Exemplo n.º 2
0
        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;
        }
Exemplo n.º 3
0
 public GameStateManagerTask(GameStateManager mgr)
     : base("Game State Manager")
 {
     myManager = mgr;
     frequency = 30;
 }