Beispiel #1
0
    public void OpenDoor()
    {
        FindObjectOfType <SoundManager>().PlaySound("Win");

        lerpTime += 0.5f * Time.deltaTime;
        doorTransform.position = new Vector3(doorTransform.position.x, doorTransform.position.y, Mathf.Lerp(doorStart, doorStop, lerpTime));

        StartCoroutine(DisableMeshRenderer());
        GetComponent <MeshRenderer>().enabled = false;

        sceneSwitch.FadeToNextLevel();
    }
Beispiel #2
0
 public void StartNewGame()
 {
     Debug.Log("Clicked");
     sceneSwitch.FadeToNextLevel();
 }