This project is read-only.

GameState has no Draw() method?

Nov 9, 2011 at 12:45 AM

I couldn't override any draw method in a class I had that inherited from Nuclex.Game.GameState().  Therefore, I looked into the reflected code of GameState and saw:

 

using Microsoft.Xna.Framework;
using System;

namespace Nuclex.Game.States
{
    // Summary:
    //     Base class for updateable game states
    public abstract class GameState : IGameState, IUpdateable
    {
        protected GameState();

        // Summary:
        //     Whether the game state is currently paused
        protected bool Paused { get; }

        // Summary:
        //     Called when the game state has been entered
        protected virtual void OnEntered();
        //
        // Summary:
        //     Called when the game state is being left again
        protected virtual void OnLeaving();
        //
        // Summary:
        //     Called when the game state should enter pause mode
        protected virtual void OnPause();
        //
        // Summary:
        //     Called when the game state should resume from pause mode
        protected virtual void OnResume();
        //
        // Summary:
        //     Initializes a new game state
        public void Pause();
        //
        // Summary:
        //     Called when the game state is being resumed from pause mode
        public void Resume();
        //
        // Summary:
        //     Called when the component needs to update its state.
        //
        // Parameters:
        //   gameTime:
        //     Provides a snapshot of the Game's timing values
        public abstract void Update(GameTime gameTime);
    }
}

No draw method.  Please fix this ASAP.

Nov 9, 2011 at 2:37 PM

Use a DrawableGameState