XGameState Class
Holds a few functions for switching basic game states, such as paused and fullscreen. More advanced states should be written by the user in their game project.
  • SetSystemFont(string) - This sets the font that will be used by the engine for things like drawing the framerate. The argument passed should be the filepath of a user created "SpriteFont". See the tutorial in the Tutorials section on "Displaying the framerate of the game" for more information.
  • TogglePaused() - This will toggle whether or not the game is paused. If it is paused, it will unpause it, otherwise, it will pause it.
  • ToggleFullscreen() - This will switch the game between fullscreen and windowed mode.
  • ToggleFramerate() - This will toggle whether or not the framerate should be drawn on the top left corner of the form. This will only work if SetSystemFont() has been properly executed.

Last edited Mar 23, 2008 at 12:26 AM by Hazardous101, version 1

Comments

No comments yet.