<分区>
我有以下标题和类:
游戏.h:
#include "GameStateManager.h"
class game
{
//bunch of lines here
}
游戏状态管理器.h
#include "GameState.h"
class GameStateManager
{
//bunch of lines here
}
游戏状态.h
class GameState
{
//bunch of lines here
}
播放状态.h
#include "GameState.h"
class PlayState : public GameState
{
//bunch of lines here
}
我需要在“game.cpp”中创建一个新的 PlayState 实例。我该怎么做?