Esempio n. 1
0
        public override bool DestroyObject(AFIDENTID self)
        {
            if (mhtObject.ContainsKey(self))
            {
                AFIObject xGameObject = (AFIObject)mhtObject[self];

                string strClassName = xGameObject.ClassName();

                ClassHandleDel xHandleDel = (ClassHandleDel)mhtClassHandleDel[strClassName];
                if (null != xHandleDel && null != xHandleDel.GetHandler())
                {
                    AFIObject.ClassEventHandler xHandlerList = xHandleDel.GetHandler();
                    xHandlerList(self, xGameObject.ContainerID(), xGameObject.GroupID(), AFIObject.CLASS_EVENT_TYPE.OBJECT_DESTROY, xGameObject.ClassName(), xGameObject.ConfigIndex());
                }
                mhtObject.Remove(self);

                //AFCLog.Instance.Log(AFCLog.LOG_LEVEL.DEBUG, "Destroy object: " + self.ToString() + " ClassName: " + strClassName + " SceneID: " + xGameObject.ContainerID() + " GroupID: " + xGameObject.GroupID());

                return(true);
            }

            return(false);
        }