Esempio n. 1
0
        public void EnterState(BrainState state)
        {
            Logging.LogManager.DefaultLogger.Trace(this.Owner.DynamicID.ToString() + " " + state.ToString());
            if (this._currentAction != null)
            {
                _currentAction.Stop();
            }

            _state = state;

            _currentAction = _getActionFromState(_state);
            _currentAction.Start();

            _currentAction.Target = null; //for roam for example.
        }
Esempio n. 2
0
        public void EnterState(BrainState state, Actor target)
        {
            Logging.LogManager.DefaultLogger.Trace(this.Owner.DynamicID.ToString() + " " + state.ToString());
            if (this._currentAction != null)
            {
                //dejar de hacer lo que esta haciendo actualmente
                _currentAction.Stop();
            }
            _state = state;

            _currentAction = _getActionFromState(_state);
            _currentAction.Start();

            _currentAction.Target = target;
        }