public override void changeStrategy(StrategysType strategyType) { StrategysType currentStrategyType = _currentStrategy.getStrategyType (); if (currentStrategyType == StrategysType.MOVE) { _creature.agent.Stop(); }; base.changeStrategy (strategyType); }
//прерывание и смена состояния public virtual void changeStrategy(StrategysType strategyType) { if (_allStrategy.ContainsKey(strategyType)) { _currentStrategy = _allStrategy[strategyType]; _currentStrategy.onStartState(_target); _target = _currentStrategy.target; } }