Exemplo n.º 1
0
        public TowerAction()
        {
            TowerActionState observingState = new ObservingState();
            TowerActionState shootingState  = new ShootingState();
            TowerActionState reloadingState = new ReloadingState();

            observingState.SetNextState(shootingState);
            shootingState.SetNextState(reloadingState);
            reloadingState.SetNextState(observingState);

            currentState = observingState;
        }
Exemplo n.º 2
0
 public void SetNextState(TowerActionState nextState)
 {
     this.nextState = nextState;
 }