void OnTriggerEnter(Collider other) { if (newtonController.getPosition() == NewtonIntroController.Positions.LAB) { newtonController.moveNewton(NewtonIntroController.Positions.LEVEL1); } }
// Update is called once per frame void Update() { if (newtonIntroController.enabled == true) { if (newtonIntroController.getState() == NewtonIntroController.States.POSTINTRO && newtonIntroController.getPosition() == NewtonIntroController.Positions.LEVEL1) { float distance = Vector3.Distance(playerObject.transform.position, newton.transform.position); if (distance < 7.5) { onFinished(); } } } }