Different Code

I did it a litte bit more easy like this:

void WinSequenze()

{

GetComponent<Movement>().enabled = false;

if (isTransitioning == false) 

{

    audioSource.PlayOneShot(succes);

    isTransitioning = true;

    Invoke("LoadLevel", delayTime);

}

}

Privacy & Terms