Ejemplo n.º 1
0
        public void disposeArrow()
        {
            List <Vector3> keys = new List <Vector3>(sceneArrowMap.Keys);

            foreach (Vector3 key in keys)
            {
                sceneArrowMap[key].SetActive(false);
                SelfDestroy.Destroy(sceneArrowMap[key]);
            }
            sceneArrowMap.Clear();
            if (tipsLightObj != null)
            {
                SelfDestroy.Destroy(tipsLightObj);
            }
        }
Ejemplo n.º 2
0
        public virtual void removeObj(GameObject obj)
        {
            _listObj.Remove(obj);
            GameObjectController controller = obj.GetComponent <GameObjectController>();

            _mapObj.Remove(controller.baseAttribute.aoId);
            controller.On_ChangeChunk -= HandleOn_ChangeChunk;
            List <GameObject> list;
            WorldPos          pos = controller.gameObjectState.attachChunk.worldPos;

            _mapChunkPosObj.TryGetValue(pos, out list);
            if (list != null)
            {
                list.Remove(obj);
                if (list.Count <= 0)
                {
                    _mapChunkPosObj.Remove(pos);
                }
            }
            obj.SetActive(false);
            SelfDestroy.Destroy(obj);
        }