示例#1
0
 public static void KillPlayer(Idle player)
 {
     BGMLvl.StopBGM();
     SoundManager.PlaySound("death");
     Destroy(player.gameObject);
     gm.StartCoroutine(gm.RespawnPlayer());
 }
示例#2
0
    public IEnumerator RespawnPlayer()
    {
        yield return(new WaitForSeconds(spawnDelay));

        Instantiate(playerPrefab.gameObject, spawnPoint.position, spawnPoint.rotation);
        SoundManager.PlaySound("start");
        yield return(new WaitForSeconds(soundDelay));

        BGMLvl.StartBGM();
    }
示例#3
0
 public static void isWin()
 {
     BGMLvl.StopBGM();
     if (score < 100)
     {
         //Game Over
         lives   = 0;
         poinMin = true;
         SoundManager.PlaySound("gameOver");
     }
     else
     {
         //win
         win = true;
         SoundManager.PlaySound("win");
     }
 }