예제 #1
0
        public StateController(
            IPlacidState placidState,
            IHostileState hostileState,
            IDeadState deadState)
        {
            _placidState = placidState;
            _placidState.InitializeStateController(this);

            _hostileState = hostileState;
            _hostileState.InitializeStateController(this);

            _deadState = deadState;
            _deadState.InitializeStateController(this);

            SetState(GetPlacidState());
        }
예제 #2
0
 public StateControllerTests()
 {
     _placidState  = Mock.Create <IPlacidState>();
     _hostileState = Mock.Create <IHostileState>();
     _deadState    = Mock.Create <IDeadState>();
 }