Beispiel #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;
        }
Beispiel #2
0
 public void SetNextState(TowerActionState nextState)
 {
     this.nextState = nextState;
 }