private void Start() { if (FindObjectOfType <SceneChangeData>().previousScene == 1) { door.SetDoorOpen(); doorClosed = false; } RaycastHit hit; Physics.Raycast(playerStandAt.position + Vector3.up, Vector3.down, out hit); playerStandAt.position = hit.point; Physics.Raycast(playerMoveTo.position + Vector3.up, Vector3.down, out hit); playerMoveTo.position = hit.point; }
private void Start() { if (!mustBeInOrder) { buttonsPressed = new List <CombinationLockButton>(); } if (FindObjectOfType <SceneChangeData>().previousScene == 2) { foreach (Light light in doorLights) { light.color = Color.green; } door.SetDoorOpen(); opened = true; } else { for (int i = 0; i < locks.Length; i++) { locks[i] = false; } } }