|
@@ -186,7 +186,7 @@ namespace GFGGame
|
|
|
//特效
|
|
|
if (!string.IsNullOrEmpty(effRes))
|
|
|
{
|
|
|
- TryAddEffectObj(effRes, BODY_EFFECT_OBJ_NAME, parentObj, 0);
|
|
|
+ TryAddEffectObj(effRes, BODY_EFFECT_OBJ_NAME, parentObj, 0, false);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -237,9 +237,10 @@ namespace GFGGame
|
|
|
//这里需要先添加静态图,防止加载动画有延迟,出现光头
|
|
|
GameObject spriteObj = AddSpriteObj(res, ext, spritObjName, parentObj, sortingOrder, needSetMask);
|
|
|
|
|
|
+ GameObject aniObj = null;
|
|
|
if (showAni)
|
|
|
{
|
|
|
- var aniObj = AddAnimationObj(res, aniObjName, parentObj, sortingOrder);
|
|
|
+ aniObj = AddAnimationObj(res, aniObjName, parentObj, sortingOrder);
|
|
|
if (aniObj != null && spriteObj != null)
|
|
|
{
|
|
|
Timers.inst.Add(0.03f, 1, (obj) =>
|
|
@@ -269,7 +270,7 @@ namespace GFGGame
|
|
|
|
|
|
aniObjName = string.Format(FORMAT_EFFECT_OBJ_NAME, itemCfg.subType, layerId);
|
|
|
TryRemoveObj(parentObj, aniObjName);
|
|
|
- TryAddEffectObj(res, aniObjName, parentObj, sortingOrder);
|
|
|
+ TryAddEffectObj(res, aniObjName, parentObj, sortingOrder, aniObj != null);
|
|
|
}
|
|
|
|
|
|
private static GameObject AddSpriteObj(string res, string ext, string objName, GameObject parentObj, int sortingOrder, bool needSetMask)
|
|
@@ -423,9 +424,9 @@ namespace GFGGame
|
|
|
return gameObj;
|
|
|
}
|
|
|
|
|
|
- private static void TryAddEffectObj(string res, string objName, GameObject parentObj, int sortingOrder)
|
|
|
+ private static void TryAddEffectObj(string res, string objName, GameObject parentObj, int sortingOrder, bool toAni)
|
|
|
{
|
|
|
- var resPath = ResPathUtil.GetDressUpEffectPath(res);
|
|
|
+ var resPath = ResPathUtil.GetDressUpEffectPath(res, toAni);
|
|
|
if (!VEngine.Versions.Contains(resPath))
|
|
|
{
|
|
|
return;
|