Beispiel #1
0
        public void ChangeState(ShipStates state, params object[] constructorArgs)
        {
            if (_state != null)
            {
                _state.Stop();
            }

            _state = _stateFactory.Create(state, constructorArgs);
            _state.Start();
        }
Beispiel #2
0
 public void Initialize()
 {
     _state = _stateFactory.Create(ShipStates.WaitingToStart, this);
     _hooks.TriggerEnter += OnTriggerEnter;
 }