private void OnTriggerEnter(Collider other) { if (other.gameObject == correctCube) { cubeChecker = true; } if (cubeChecker == true) { Debug.Log("Win"); doorAnimator.OpenDoor(); } }
public void OpenDoor() { door.OpenDoor(); Debug.Log("I'm being played"); }