/** This loads the chosen game **/ internal void loadPlayState(int lvl) { musicFile.Stop(); PlayState ps = new PlayState(eng, _ms, lvl); LoadScreenState ls = new LoadScreenState(eng, ps, lvl); eng.ChangeState(ls); }
/// <summary> /// Called by mouse or keyboard handlers when the user picked a button (by clicking or hitting enter) /// </summary> internal void handleButtonPress() { // Go to next page switch (cur_page) { case 3: PlayState ps = new PlayState(eng, menu, 0); LoadScreenState ls = new LoadScreenState(eng, ps, 0); eng.ChangeState(ls); break; } }
/// <summary> /// Called by mouse or keyboard handlers when the user picked a button (by clicking or hitting enter) /// </summary> internal void handleButtonPress() { if (lvl == eng.max_level) { MainMenuState ms = new MainMenuState(eng); eng.ChangeState(ms); } else { // Go to next level MainMenuState ms = new MainMenuState(eng); PlayState ps = new PlayState(eng, ms, lvl); LoadScreenState ls = new LoadScreenState(eng, ps, lvl); eng.ChangeState(ls); } }
internal void loadPlayState(int lvl) { PlayState ps = new PlayState(eng, menu, lvl); LoadScreenState ls = new LoadScreenState(eng, ps, lvl); eng.ChangeState(ls); }