Ejemplo n.º 1
0
        public void Execute(TState state)
        {
            StateLogger.LogStateChanged(this, State, state);

            GameProfiler.BeginSample("Stop state");
            Stop();
            GameProfiler.EndSample();

            State = state;
            StateEnter(State);

            GameProfiler.BeginSample("ExecuteState");
            _executor.Execute(state);
            GameProfiler.EndSample();
        }
 public void Execute(IAsyncStateBehaviour state)
 {
     GameProfiler.BeginSample("Stop state");
     Stop();
     GameProfiler.EndSample();
     if (state == null)
     {
         Debug.LogErrorFormat("State Machine State NULL not exists in current context");
         return;
     }
     GameLog.LogFormat(ExecuteStateTemplate, _color, state);
     GameProfiler.BeginSample("ExecuteState");
     ExecuteState(state);
     GameProfiler.EndSample();
 }