|
@@ -93,6 +93,15 @@ namespace GFGGame
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ public static string GetSpriteName(ItemCfg itemCfg, int layer)
|
|
|
|
+ {
|
|
|
|
+ if(itemCfg.subType == ConstDressUpItemType.BEI_JING)
|
|
|
|
+ {
|
|
|
|
+ return "Bg";
|
|
|
|
+ }
|
|
|
|
+ return string.Format(FORMAT_SPRITE_NAME, itemCfg.id, layer);
|
|
|
|
+ }
|
|
|
|
+
|
|
public static void RemoveItem(int itemID, GameObject parentObj)
|
|
public static void RemoveItem(int itemID, GameObject parentObj)
|
|
{
|
|
{
|
|
ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(itemID);
|
|
ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(itemID);
|
|
@@ -102,7 +111,7 @@ namespace GFGGame
|
|
//默认层
|
|
//默认层
|
|
if (!string.IsNullOrEmpty(itemCfg.resLayer1))
|
|
if (!string.IsNullOrEmpty(itemCfg.resLayer1))
|
|
{
|
|
{
|
|
- spritObjName = string.Format(FORMAT_SPRITE_NAME, itemCfg.id, 1);
|
|
|
|
|
|
+ spritObjName = GetSpriteName(itemCfg, 1);
|
|
TryRemoveSprite(parentObj, spritObjName);
|
|
TryRemoveSprite(parentObj, spritObjName);
|
|
aniObjName = string.Format(FORMAT_ANIMATION_NAME, itemCfg.id, 1);
|
|
aniObjName = string.Format(FORMAT_ANIMATION_NAME, itemCfg.id, 1);
|
|
TryRemoveObj(parentObj, aniObjName);
|
|
TryRemoveObj(parentObj, aniObjName);
|
|
@@ -112,7 +121,7 @@ namespace GFGGame
|
|
//特殊层
|
|
//特殊层
|
|
if (!string.IsNullOrEmpty(itemCfg.resLayer2))
|
|
if (!string.IsNullOrEmpty(itemCfg.resLayer2))
|
|
{
|
|
{
|
|
- spritObjName = string.Format(FORMAT_SPRITE_NAME, itemCfg.id, 2);
|
|
|
|
|
|
+ spritObjName = GetSpriteName(itemCfg, 2);
|
|
TryRemoveSprite(parentObj, spritObjName);
|
|
TryRemoveSprite(parentObj, spritObjName);
|
|
aniObjName = string.Format(FORMAT_ANIMATION_NAME, itemCfg.id, 2);
|
|
aniObjName = string.Format(FORMAT_ANIMATION_NAME, itemCfg.id, 2);
|
|
TryRemoveObj(parentObj, aniObjName);
|
|
TryRemoveObj(parentObj, aniObjName);
|
|
@@ -122,7 +131,7 @@ namespace GFGGame
|
|
//第三层
|
|
//第三层
|
|
if (!string.IsNullOrEmpty(itemCfg.resLayer3))
|
|
if (!string.IsNullOrEmpty(itemCfg.resLayer3))
|
|
{
|
|
{
|
|
- spritObjName = string.Format(FORMAT_SPRITE_NAME, itemCfg.id, 3);
|
|
|
|
|
|
+ spritObjName = GetSpriteName(itemCfg, 3);
|
|
TryRemoveSprite(parentObj, spritObjName);
|
|
TryRemoveSprite(parentObj, spritObjName);
|
|
aniObjName = string.Format(FORMAT_ANIMATION_NAME, itemCfg.id, 3);
|
|
aniObjName = string.Format(FORMAT_ANIMATION_NAME, itemCfg.id, 3);
|
|
TryRemoveObj(parentObj, aniObjName);
|
|
TryRemoveObj(parentObj, aniObjName);
|
|
@@ -256,7 +265,7 @@ namespace GFGGame
|
|
}
|
|
}
|
|
|
|
|
|
//特效
|
|
//特效
|
|
- string effectResPath = ResPathUtil.GetDressUpLayerEffectResPath(itemCfg, layerId);
|
|
|
|
|
|
+ string effectResPath = ResPathUtil.GetDressUpLayerEffectResPath(itemCfg, layerId, showAni);
|
|
if (!YooAssets.CheckResExist(effectResPath))
|
|
if (!YooAssets.CheckResExist(effectResPath))
|
|
{
|
|
{
|
|
effectResPath = null;
|
|
effectResPath = null;
|