public IEnumerator Victory() { cloud.inTutLevel = false; theAM.GetComponent <AudioSource>().pitch = 1f; theAM.GetComponent <AudioSource>().loop = false; theAM.ChangeBGM(victoryMusic); yield return(new WaitForSeconds(8)); levelLoadering.LoadLevel(); // StartCoroutine("WaitTillAtMid"); // player.enabled = true; //LoadLevel(); }
public IEnumerator Victory() { theAM.GetComponent <AudioSource>().pitch = 1f; theAM.GetComponent <AudioSource>().loop = false; theAM.ChangeBGM(victoryMusic); yield return(new WaitForSeconds(8)); levelLoadering.LoadLevel(); }
// Update is called once per frame void Update() { if (enemyHealth <= 0) { Instantiate(deathEffect, transform.position, transform.rotation); PickUpManageScript.PickUpManagement(); loadLevelObject.LoadLevel(); Destroy(gameObject); } }