Esempio n. 1
0
    // initializing diffrent dependancies.
    void Start()
    {
        rayElevatorPlatform = this.GetComponentInChildren <ElevatorPlatformTrigger>();

        elevatorStopped    = new StopElevator();
        elevatorMovingUp   = new ElevatorMoveUp(this);
        elevatorMovingDown = new ElevatorMovesDown(this);

        // Our elevator starts in the stopped state;
        curentState = elevatorStopped;
    }
Esempio n. 2
0
 // methods used to swap the elevator's state
 public void setElevatorState(IElevatorStates newElevatorState)
 {
     curentState = newElevatorState;
 }