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