/*private void StopGame() * { * scorePanel.SetActive(false); * fuelPanel.SetActive(false); * enemyDistancePanel.SetActive(false); * }*/ public void FinishGame(bool win, PlayerController.DeathType dt) { isWin = win; if (dt == PlayerController.DeathType.CatchEnemy) { vp.clip = winClip; vp.gameObject.SetActive(true); anim.SetTrigger("Change"); Invoke("ActiveEndMenu", 3.5f); } else if (dt == PlayerController.DeathType.EnemyRunAway) { vp.clip = loseClip; vp.gameObject.SetActive(true); anim.SetTrigger("Change"); Invoke("ActiveEndMenu", 2.5f); } else { if (isWin) { endGameMenu.WinSetUp(); } else { endGameMenu.LoseSetUp(); } anim.SetTrigger("Change"); Invoke("killVideo", .5f); } }