⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 coininsertedstate.cpp

📁 VIGASOCO (VIdeo GAmes SOurce COde) Windows port (v0.01)
💻 CPP
字号:
// CoinInsertedState.cpp
//
/////////////////////////////////////////////////////////////////////////////

#include "CoinInsertedState.h"
#include "CoinInsertedSubstates.h"

GameSubstate *CoinInsertedState::substates[5];

/////////////////////////////////////////////////////////////////////////////
// initialization and cleanup
/////////////////////////////////////////////////////////////////////////////

CoinInsertedState::CoinInsertedState()
{
	substate = 0;

	substates[0] = new CoinInsertedShowInfoSubstate();
	substates[1] = new CoinInsertedWaitForStartSubstate();
	substates[2] = new CoinInsertedPrepareFirstLevelSubstate ();
	substates[3] = 0;
	substates[4] = new CoinInsertedChangeToPlayingSubstate();
}

CoinInsertedState::~CoinInsertedState()
{
	for (int i = 0; i < 5; i++){
		delete substates[i];
	}
}


void CoinInsertedState::run()
{
	// delegate the action to the substate
	if (substates[substate]){
		substates[substate]->run();
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -