Esempio n. 1
0
        public StateManager(StateSystem statesystem, Combat.Character character, ReadOnlyKeyedCollection<Int32, State> states)
        {
            if (statesystem == null) throw new ArgumentNullException("statesystem");
            if (character == null) throw new ArgumentNullException("character");
            if (states == null) throw new ArgumentNullException("states");

            m_statesystem = statesystem;
            m_character = character;
            m_states = states;
            m_persistencemap = new Dictionary<StateController, Int32>();
            m_foreignmanager = null;
            m_statetime = 0;

            #if DEBUG
            m_stateorder = new CircularBuffer<State>(10);
            #else
            m_currentstate = null;
            m_previousstate = null;
            #endif
        }
Esempio n. 2
0
        public void Clear()
        {
            m_foreignmanager = null;
            m_persistencemap.Clear();
            m_statetime = 0;

            #if DEBUG
            m_stateorder.Clear();
            #else
            m_currentstate = null;
            m_previousstate = null;
            #endif
        }