예제 #1
0
        // Token: 0x06008ACB RID: 35531 RVA: 0x00286F60 File Offset: 0x00285160
        public GenericGraphic Create(string assetName)
        {
            if (string.IsNullOrEmpty(assetName))
            {
                return(null);
            }
            List <GenericGraphic> list;

            if (this.m_pool.TryGetValue(assetName, out list) && list.Count > 0)
            {
                GenericGraphic genericGraphic = list[list.Count - 1];
                list.RemoveAt(list.Count - 1);
                genericGraphic.SetActive(true);
                return(genericGraphic);
            }
            GenericGraphic genericGraphic2 = new GenericGraphic();

            if (genericGraphic2.Create(assetName, this.m_isFx))
            {
                if (this.m_parentGameObject != null)
                {
                    genericGraphic2.SetParent(this.m_parentGameObject);
                }
                return(genericGraphic2);
            }
            genericGraphic2.Destroy();
            return(null);
        }
예제 #2
0
        // Token: 0x06008A7B RID: 35451 RVA: 0x00283FDC File Offset: 0x002821DC
        public GenericGraphic Play(string assetName)
        {
            if (string.IsNullOrEmpty(assetName))
            {
                return(null);
            }
            GenericGraphic genericGraphic = this.m_pool.Create(assetName);

            if (genericGraphic != null)
            {
                if (this.m_parentGameObject != null)
                {
                    genericGraphic.SetParent(this.m_parentGameObject);
                }
                this.m_fxs.Add(genericGraphic);
            }
            return(genericGraphic);
        }
예제 #3
0
        // Token: 0x06009733 RID: 38707 RVA: 0x002B3414 File Offset: 0x002B1614
        public GenericGraphic CreateGraphic(string assetName, float scale)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_CreateGraphicStringSingle_hotfix != null)
            {
                return((GenericGraphic)this.m_CreateGraphicStringSingle_hotfix.call(new object[]
                {
                    this,
                    assetName,
                    scale
                }));
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            GenericGraphic genericGraphic = this.m_graphicPool.Create(assetName);

            if (genericGraphic != null)
            {
                genericGraphic.SetParent(this.m_graphicRoot);
                genericGraphic.SetPrefabScale(scale);
            }
            return(genericGraphic);
        }
예제 #4
0
        // Token: 0x06008ACC RID: 35532 RVA: 0x00287000 File Offset: 0x00285200
        public void Destroy(GenericGraphic g)
        {
            if (g == null)
            {
                return;
            }
            string assetName = g.AssetName;
            List <GenericGraphic> list;

            if (!this.m_pool.TryGetValue(assetName, out list))
            {
                list = new List <GenericGraphic>();
                this.m_pool.Add(assetName, list);
            }
            g.SetActive(false);
            if (this.m_parentGameObject != null)
            {
                g.SetParent(this.m_parentGameObject);
            }
            list.Add(g);
        }