Space Fighter
A "shmup" game for Computer Programming C++
Loading...
Searching...
No Matches
SpaceFighter Class Reference

The main game class for the Space Fighter game. More...

#include <SpaceFighter.h>

Inheritance diagram for SpaceFighter:

Public Member Functions

 SpaceFighter ()
 Initializes a new instance of the SpaceFighter game.
 
virtual ~SpaceFighter ()
 
virtual std::string GetName () const
 Gets the name of the game.
 
virtual void LoadContent (ResourceManager &resourceManager)
 Called when resources need to be loaded.
 
virtual void Draw (SpriteBatch &spriteBatch)
 Called when the game determines it is time to draw a frame.
 
- Public Member Functions inherited from KatanaEngine::Game
 Game ()
 
virtual ~Game ()
 
virtual int Run ()
 Runs the game instance.
 
virtual ResourceManager * GetResourceManager () const
 Gets a pointer to the ResourceManager, for loading and managing resources.
 
virtual ScreenManager * GetScreenManager () const
 Gets a pointer to the ScreenManager, for managing game screens.
 
virtual SpriteBatch * GetSpriteBatch () const
 Gets a pointer to the SpriteBatch, for rendering.
 
virtual void UnloadContent ()
 Called when resources need to be unloaded. Override this method to unload any game-specific resources.
 
virtual void Update (const GameTime &gameTime)
 Called when the game has determined that game logic needs to be processed.
 
virtual void Quit ()
 Quits the game.
 

Additional Inherited Members

- Static Public Member Functions inherited from KatanaEngine::Game
static int GetScreenWidth ()
 Gets the screen width in pixels.
 
static int GetScreenHeight ()
 Gets the screen width in pixels.
 
static Vector2 GetScreenCenter ()
 Gets the screen size in pixels.
 
- Protected Member Functions inherited from KatanaEngine::Game
virtual void SetResourceDirectory (const std::string &path)
 Sets the location of the directory where the game's resources are stored.
 
virtual void SetTargetFramesPerSecond (int const frames)
 Sets the target frame rate for the game.
 
virtual void SetFrameCounterFont (Font *pFont)
 Sets the font for the frame counter.
 
virtual void InitializeScreenManager ()
 Initializes the game's ScreenManager.
 
virtual void DisplayFrameRate ()
 Displays the game's current frame rate.
 
virtual void SetFullScreen (bool isFullScreen)
 Sets the game to display in fullscreen mode.
 
virtual void SetOpenGLFlag ()
 Sets the OpenGL flag, which forces OpenGL rendering.
 
virtual void ResetGameTime ()
 Resets the game's timing values.
 
- Static Protected Member Functions inherited from KatanaEngine::Game
static void SetScreenResolution (int width, int height)
 Sets the screen resolution.
 
static void SetWindowTitle (std::string title)
 Sets the title of the game window.
 

Detailed Description

The main game class for the Space Fighter game.

Definition at line 10 of file SpaceFighter.h.

Constructor & Destructor Documentation

◆ SpaceFighter()

SpaceFighter::SpaceFighter ( )

Initializes a new instance of the SpaceFighter game.

Definition at line 11 of file SpaceFighter.cpp.

◆ ~SpaceFighter()

virtual SpaceFighter::~SpaceFighter ( )
inlinevirtual

Definition at line 16 of file SpaceFighter.h.

Member Function Documentation

◆ Draw()

void SpaceFighter::Draw ( SpriteBatch & spriteBatch)
virtual

Called when the game determines it is time to draw a frame.

Parameters
spriteBatchA reference to the game's sprite batch, used for rendering.

Reimplemented from KatanaEngine::Game.

Definition at line 39 of file SpaceFighter.cpp.

◆ GetName()

virtual std::string SpaceFighter::GetName ( ) const
inlinevirtual

Gets the name of the game.

Implements KatanaEngine::Game.

Definition at line 19 of file SpaceFighter.h.

◆ LoadContent()

void SpaceFighter::LoadContent ( ResourceManager & resourceManager)
virtual

Called when resources need to be loaded.

Parameters
resourceManagerA reference to the game's resource manager, used for loading and managing game assets (resources).

Reimplemented from KatanaEngine::Game.

Definition at line 27 of file SpaceFighter.cpp.


The documentation for this class was generated from the following files: