YourCityInvadedByAliens
Documentation for code of the game
Public Member Functions | Private Attributes | List of all members
GameState Class Reference

#include <game_state.h>

Collaboration diagram for GameState:
Collaboration graph
[legend]

Public Member Functions

 GameState (int windowWidth, int windowHeight)
 
void init ()
 
void updateElapsedTime ()
 
void addBuilding (GameBuilding *)
 
long getElapsedTime () const
 
const CoordXYgetCoordLeftTop () const
 
void setCoordLeftTop (const CoordXY &)
 
bool isChangedWindowSize () const
 
int getWindowWidth () const
 
int getWindowHeight () const
 
const YRectgetWindowRect () const
 
void updateWindowSize (int w, int h)
 
void setMouseCaptured (bool bMouseCaptured)
 
bool isMouseCaptured () const
 
void setPlayMusic (bool bPlayMusic)
 
void togglePlayMusic ()
 
bool isPlayMusic () const
 
void setMinPoint (const CoordXY &p)
 
const CoordXYgetMinPoint ()
 
void setMaxPoint (const CoordXY &p)
 
const CoordXYgetMaxPoint ()
 

Private Attributes

bool m_bMouseCaptured
 
bool m_bPlayMusic
 
long m_nElapsedTime
 
long m_nStartTime
 
CoordXY m_coordLeftTop
 
CoordXY m_maxPoint
 
CoordXY m_minPoint
 
bool m_bIsChangedWindowSize
 
int m_nWindowWidth
 
int m_nWindowHeight
 
YRect m_windowRect
 
std::vector< GameBuilding * > m_vBuildings
 

Constructor & Destructor Documentation

◆ GameState()

GameState::GameState ( int  windowWidth,
int  windowHeight 
)

Member Function Documentation

◆ addBuilding()

void GameState::addBuilding ( GameBuilding pBuilding)

◆ getCoordLeftTop()

const CoordXY & GameState::getCoordLeftTop ( ) const

◆ getElapsedTime()

long GameState::getElapsedTime ( ) const

◆ getMaxPoint()

const CoordXY & GameState::getMaxPoint ( )

◆ getMinPoint()

const CoordXY & GameState::getMinPoint ( )

◆ getWindowHeight()

int GameState::getWindowHeight ( ) const

◆ getWindowRect()

const YRect & GameState::getWindowRect ( ) const

◆ getWindowWidth()

int GameState::getWindowWidth ( ) const

◆ init()

void GameState::init ( )

◆ isChangedWindowSize()

bool GameState::isChangedWindowSize ( ) const

◆ isMouseCaptured()

bool GameState::isMouseCaptured ( ) const

◆ isPlayMusic()

bool GameState::isPlayMusic ( ) const

◆ setCoordLeftTop()

void GameState::setCoordLeftTop ( const CoordXY newCoordLeftTop)

◆ setMaxPoint()

void GameState::setMaxPoint ( const CoordXY p)

◆ setMinPoint()

void GameState::setMinPoint ( const CoordXY p)

◆ setMouseCaptured()

void GameState::setMouseCaptured ( bool  bMouseCaptured)

◆ setPlayMusic()

void GameState::setPlayMusic ( bool  bPlayMusic)

◆ togglePlayMusic()

void GameState::togglePlayMusic ( )

◆ updateElapsedTime()

void GameState::updateElapsedTime ( )

◆ updateWindowSize()

void GameState::updateWindowSize ( int  w,
int  h 
)

Member Data Documentation

◆ m_bIsChangedWindowSize

bool GameState::m_bIsChangedWindowSize
private

◆ m_bMouseCaptured

bool GameState::m_bMouseCaptured
private

◆ m_bPlayMusic

bool GameState::m_bPlayMusic
private

◆ m_coordLeftTop

CoordXY GameState::m_coordLeftTop
private

◆ m_maxPoint

CoordXY GameState::m_maxPoint
private

◆ m_minPoint

CoordXY GameState::m_minPoint
private

◆ m_nElapsedTime

long GameState::m_nElapsedTime
private

◆ m_nStartTime

long GameState::m_nStartTime
private

◆ m_nWindowHeight

int GameState::m_nWindowHeight
private

◆ m_nWindowWidth

int GameState::m_nWindowWidth
private

◆ m_vBuildings

std::vector<GameBuilding *> GameState::m_vBuildings
private

◆ m_windowRect

YRect GameState::m_windowRect
private

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