|
@@ -1,7 +1,7 @@
|
|
|
using UnityEngine;
|
|
|
-using System;
|
|
|
using Live2D.Cubism.Rendering;
|
|
|
using System.IO;
|
|
|
+using FairyGUI;
|
|
|
|
|
|
namespace GFGGame
|
|
|
{
|
|
@@ -201,14 +201,20 @@ namespace GFGGame
|
|
|
GameObject.DestroyImmediate(tf.gameObject);
|
|
|
tf = null;
|
|
|
}
|
|
|
+ string ext = ItemUtil.GetItemResExt(itemCfg.itemType, itemCfg.subType);
|
|
|
+ AddSpriteObj(res, ext, objName, parentObj, sortingOrder, needSetMask);
|
|
|
if (itemCfg.isAni > 0 && showAni)
|
|
|
{
|
|
|
+ tf = parentObj.transform.Find(objName);
|
|
|
AddAnimationObj(res, objName, parentObj, sortingOrder);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- string ext = ItemUtil.GetItemResExt(itemCfg.itemType, itemCfg.subType);
|
|
|
- AddSpriteObj(res, ext, objName, parentObj, sortingOrder, needSetMask);
|
|
|
+ Timers.inst.Add(0.03f, 1, (obj) =>
|
|
|
+ {
|
|
|
+ if (tf != null && tf.gameObject != null && tf.gameObject.activeInHierarchy)
|
|
|
+ {
|
|
|
+ GameObject.DestroyImmediate(tf.gameObject);
|
|
|
+ tf = null;
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
}
|