private void OnTriggerEnter(Collider other) { if (!other.CompareTag("Player")) { return; } m_Controller.doorsOccupied = true; if (m_Controller.doorsClosing) { m_Controller.OpenDoors(); } }
public void RegisterAction() { if (doorActionRequest) { // Open door if (floor == 0) { m_ElevatorController.OpenDoors(); } // Close door else if (floor == 1) { m_ElevatorController.CloseDoors(); } return; } var up = m_ElevatorController.CalculateFloorsToMove(floor) > 0; m_ElevatorController.Call(floor, up); }