void ReactToWin(WinChunkEnteredEvent e) { AkSoundEngine.PostEvent("Play_MusVO11", gameObject); StartCoroutine(WinReaction()); StartCoroutine(PlayWinSound()); WinGame(); }
private void WonGame(WinChunkEnteredEvent e) { drivingStarted = false; PlaySound("Stop_Pedal"); PlaySound("Play_MusicWin"); if (!isDialogue) { isDialogue = true; AkSoundEngine.PostEvent("Play_MusVO11", gameObject, (uint)AkCallbackType.AK_EndOfEvent, DialogueCallbackFunction, gameObject); } }
void StopMovement(WinChunkEnteredEvent e) { int amountOfCarriablesOnBike = stackedList.CollectedCarriables.Count - numberOfLostCarriables; amountOfCarriablesOnBike = amountOfCarriablesOnBike == 0 ? 1 : amountOfCarriablesOnBike; PlayerPrefs.SetInt("Amount of Carriables", amountOfCarriablesOnBike); movementController.StartDecelerating(); animator.SetTrigger("StopBike"); EventManager.Instance.StopListening <MovementInput>(RetrieveInput); }