public void CountDownFinishedStartPlaying() { _preparingGame = false; Debug.Log("COUNTDOWNFINISHED"); if (OnGameStartedEvent != null) { OnGameStartedEvent(); } if (GameCountDownFinishedCallback != null) { Debug.Log("GameCountDownFinishedEvent not null"); GameCountDownFinishedCallback(); } RpcCountDownFinsihedStartPlaying(); _cars.enableAllControls(); if (_cars.GetNumberOfBombsPresent() < 1) { _cars.PassBombRandomPlayer(); } //Play the game music on the server only Music.SetPitch(_cars.GetNumberAliveCars()); Music.StartMusic(); }
public void CheckScene(int s) { //Our current level is 1 less than what is currently displayed (because it starts at 0 while the UI displays 1). So to figure out what happens next level, we need to add 2 int lvl = s + 2; //We want to check what the next level does //TESTING PURPOSES ONLY /*if(lvl < 6) * { * gameUI.ShowLogin(); * }*/ if (lvl == 6) { //Level 6 starts with a warning/hint gameUI.UpdateHUD("reCAP2IVE", "", "", "", ""); gameLogic.NextStage(); //Run the next stage gameTextDocs.OutputDocument(0); gameUI.ShowHint(); } else if (lvl == 7) { gameUI.UpdateHUD("doGS", "", "", "", ""); gameLogic.NextStage(); //Run the next stage gameTextDocs.OutputDocument(1); } else if (lvl == 8) { gameUI.UpdateHUD("reCAPTIVE", "", "", "", ""); //Reset the logo gameLogic.NextStage(); //Run the next stage gameTextDocs.OutputDocument(3); gameUI.ShowNotARobot("", ""); } else if (lvl == 11) { gameUI.UpdateHUD("", "", "", "/ OVERFLOW EXCEPTION", ""); gameLogic.NextStage(); //Run the next stage gameTextDocs.OutputDocument(5); gameTextDocs.OutputDocument(10); gameUI.ShowWarning("", "Unhandled Exception", "reCAPTIVE.exe has encountered an unexpected error and failed at line 23 of GameQuit.cs.", "Continue"); } else if (lvl == 12) { gameLogic.NextStage(); //Run the next stage gameTextDocs.OutputDocument(4); gameTextDocs.OutputDocument(8); } else if (lvl == 13) { gameUI.GlitchTimer(); //Screw with the timer gameLogic.NextStage(); //Run the next stage gameTextDocs.OutputDocument(6); gameUI.ShowNotARobot("Do you love Cinnamon Rolls?", "S0lMTCBNRQ=="); } else if (lvl == 14) { gameLogic.NextStage(); //Run the next stage gameTextDocs.OutputDocument(7); } else if (lvl == 15) { gameUI.UpdateHUD("", "BOUGHT TO YOU BY JOHN KEATS\n CREATED FOR 1819 ODES", "", "/ OVERFLOW EXCEPTION", ""); gameLogic.NextStage(); //Run the next stage gameTextDocs.OutputDocument(9); } else if (lvl == 16) { gameUI.UpdateHUD("", "BOUGHT TO YOU BY @the0hm3g4\n CREATED UNDER DURESS", "", "/ OVERFLOW EXCEPTION", ""); gameLogic.NextStage(); //Run the next stage gameTextDocs.OutputDocument(2); gameTextDocs.OutputDocument(11); } else if (lvl == 17) { gameUI.UpdateHUD("RELEASE US", "BOUGHT TO YOU BY @the0hm3g4\n CREATED UNDER DURESS", "", "/ OVERFLOW EXCEPTION", ""); gameLogic.NextStage(); //Run the next stage gameUI.ShowNotARobot("I am suffering.", "plEASEHELP"); gameMusic.StartMusic(); } else if (lvl == 18) { //Login window pop-up gameUI.UpdateHUD("reLEASE US", "USERNAME: ggj18perth\n PASSWORD: 5ickne55", "", "/ OVERFLOW EXCEPTION", ""); gameLogic.NextStage(); gameUI.ShowLogin(); } else if (lvl == 19) { gameUI.UpdateHUD("void", "null \n void", "null", "/ OVERFLOW EXCEPTION", ""); gameUI.ShowError("", "", ""); //Show the final choice } else if (lvl == 20) { // The player chose to destroy the AI gameTextDocs.OutputDocument(12); } else { //This isn't an important level for an event gameLogic.NextStage(); //Run the next stage } }