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

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