public void ChangeState(EShipState state, params object[] constructorArgs) { if (_state != null) { _state.Stop(); } _state = _stateFactory.Create(state, constructorArgs); _state.Start(); }
public void ChangeState(ShipStates state, params object[] constructorArgs) { if (_state != null) { _state.Stop(); } _state = _stateFactory.Create(state, constructorArgs); _state.Start(); }
public void Start() { _state = _stateFactory.Create(EShipState.WaitingToStart, this); }
public void Initialize() { _state = _stateFactory.Create(ShipStates.WaitingToStart, this); _hooks.TriggerEnter += OnTriggerEnter; }