Ejemplo n.º 1
0
        /// <summary>
        /// Exits the specified state. All children states will be exited before calling exit on m_State
        /// </summary>
        public void Exit()
        {
            for (int i = 0; i < m_ChildSMs.Count; i++)
            {
                m_ChildSMs[i].Exit();
            }

            if (m_State != null)
            {
                m_State.Exit();
            }

            // reset all the data in case user is holding on to the object
            m_OwnerSM = null;
            m_Parent  = null;
            m_State   = null;
            m_ChildSMs.Clear();
        }