Beispiel #1
0
        public bool RemoveEntiy(GameObject entity)
        {
            if (!m_cEntityMap.ContainsKey(entity.GetID()))
            {
                return false;
            }

            m_cEntityMap.Remove(entity.GetID());
            return true;
        }
Beispiel #2
0
        public bool RemoveEntiy(GameObject entity)
        {
            if (!m_cEntityMap.ContainsKey(entity.GetID()))
            {
                return(false);
            }

            m_cEntityMap.Remove(entity.GetID());
            return(true);
        }
Beispiel #3
0
        /// <summary>
        /// Regist a new game object to system manager
        /// </summary>
        /// <param name="entity">return false if already have GameObject ID. Return true if regist success</param>
        public bool RegisterEntity(GameObject entity)
        {
            if(m_cEntityMap.ContainsKey(entity.GetID()))
            {
                return false;
            }

            m_cEntityMap.Add(entity.GetID(), entity);
            return true;
        }
Beispiel #4
0
        /// <summary>
        /// Regist a new game object to system manager
        /// </summary>
        /// <param name="entity">return false if already have GameObject ID. Return true if regist success</param>
        public bool RegisterEntity(GameObject entity)
        {
            if (m_cEntityMap.ContainsKey(entity.GetID()))
            {
                return(false);
            }

            m_cEntityMap.Add(entity.GetID(), entity);
            return(true);
        }