Exemple #1
0
        /// <summary>
        /// Makes the guest call the elevator
        /// </summary>
        private void CallElevator()
        {
            if (Status == MovableStatus.EVACUATING || LastStatus == MovableStatus.EVACUATING)
            {
                _EvacuateSequence();
                return;
            }

            if (Path.Any())
            {
                _Move();
            }
            else if (Area is Elevator && WantsElevator)
            {
                Hotel.CallElevator(this);
                WantsElevator = false;
                Status        = MovableStatus.WAITING_FOR_ELEVATOR;
            }
        }
Exemple #2
0
        /// <summary>
        /// Calls The Elevator
        /// </summary>
        private void _CallElevator()
        {
            if (Status == MovableStatus.EVACUATING || LastStatus == MovableStatus.EVACUATING)
            {
                SetPath(Hotel.GetArea(typeof(Reception)));
                FinalDes   = Hotel.GetArea(typeof(Reception));
                Status     = MovableStatus.EVACUATING;
                LastStatus = MovableStatus.EVACUATING;
                return;
            }

            if (Path.Any())
            {
                _Move();
            }
            else if (Area is Elevator && WantsElevator)
            {
                Hotel.CallElevator(this);
                WantsElevator = false;
                Status        = MovableStatus.WAITING_FOR_ELEVATOR;
            }
        }