Пример #1
0
    private void OnTriggerEnter(Collider other)
    {
        if (other.gameObject == correctCube)
        {
            cubeChecker = true;
        }

        if (cubeChecker == true)
        {
            Debug.Log("Win");
            doorAnimator.OpenDoor();
        }
    }
Пример #2
0
 public void OpenDoor()
 {
     door.OpenDoor();
     Debug.Log("I'm being played");
 }