public void CloseDoors() { if (closing) { return; } openings.animate(Vector3.down * 0.0225f, doorDuration); closing = true; opening = false; }
public void OpenDoors() { if (opening) { return; } if (currentShape != null) { currentShape.gameObject.SetActive(false); } currentShape = shapes[Random.Range(0, shapes.Length)]; currentShape.gameObject.SetActive(true); leftDoor.animate(Vector3.left * 0.05f, doorDuration); rightDoor.animate(Vector3.right * 0.05f, doorDuration); opening = true; closing = false; }