void WinrPanel()
 {
     SoundManagerForSort.sharedManager().PlayWinFX();
     inGamePanel.SetActive(false);
     NextLevel.onClick.AddListener(() => StageManager.sharedManager().GotoNextLevel());
     WinPanel.SetActive(true);
     Destroy(controllers);
 }
 void GameLose()
 {
     SoundManagerForSort.sharedManager().PlayLoseFX();
     inGamePanel.SetActive(false);
     btnRetry.onClick.AddListener(() => SceneManager.LoadScene(SceneManager.GetActiveScene().name));
     LosePanel.SetActive(true);
     controllers.SetActive(false);
 }
Exemplo n.º 3
0
 private void OnCollisionEnter(Collision collision)
 {
     if (collision.gameObject.CompareTag(cart1))
     {
         GameManagerforSortingFruits.sharedManager().AddFruits(cart1, 1);
         Instantiate(eggPuff, collision.transform.position, Quaternion.identity);
         SoundManagerForSort.sharedManager().PlayPerfectDropFX();
     }
     else
     {
         SoundManagerForSort.sharedManager().PlayImperfectDropFX();
     }
 }