/
trilirium
/
Pacman
Обзор
Документация
Войти
/
trilirium
/
Pacman
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
CoinInsertedState.cpp
41 строка
1018 B
Trilirium
first commit
19 июн 2026, 11:07
19 июн 2026, 11:07
d44591e
Код
Авторство
О чём код?
// CoinInsertedState.cpp // ///////////////////////////////////////////////////////////////////////////// #include "CoinInsertedState.h" #include "CoinInsertedSubstates.h" using namespace Puckman; 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(); } }