|
@@ -27,7 +27,7 @@ namespace GFGGame
|
|
|
// GameObject parentObj = null;
|
|
|
if (parentObj == null)
|
|
|
{
|
|
|
- if (itemCfg.subType == ConstDressUpItemType.BEI_JING)
|
|
|
+ if (itemCfg.subType == ConstDressUpItemType.BEI_JING || DressUpMenuItemCfg1Array.Instance.CheckIsSceneTypeBySubType(itemCfg.subType))
|
|
|
{
|
|
|
parentObj = sceneObj;
|
|
|
}
|
|
@@ -90,7 +90,7 @@ namespace GFGGame
|
|
|
{
|
|
|
if (parentObj == null)
|
|
|
{
|
|
|
- if (itemCfg.subType == ConstDressUpItemType.BEI_JING)
|
|
|
+ if (itemCfg.subType == ConstDressUpItemType.BEI_JING || DressUpMenuItemCfg1Array.Instance.CheckIsSceneTypeBySubType(itemCfg.subType))
|
|
|
{
|
|
|
parentObj = sceneObj;
|
|
|
}
|
|
@@ -176,7 +176,8 @@ namespace GFGGame
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- AddSpriteObj(res, "png", BODY_SPRITE_NAME, parentObj, 0, needSetMask);
|
|
|
+ AddSpriteObj(res, "png", BODY_SPRITE_NAME, parentObj, 0, needSetMask);
|
|
|
+ parentObj.transform.SetPositionAndRotation(new Vector3(), new Quaternion());
|
|
|
}
|
|
|
//特效
|
|
|
if (!string.IsNullOrEmpty(effRes))
|
|
@@ -353,6 +354,12 @@ namespace GFGGame
|
|
|
var prefab = GFGAsset.Load<GameObject>(resPath);
|
|
|
var gameObj = GameObject.Instantiate(prefab);
|
|
|
AddAssetReleaser(gameObj, resPath);
|
|
|
+ if(objName == BODY_ANIMATION_NAME)
|
|
|
+ {
|
|
|
+ //如果是动作动画,就根据动画位置及角度信息设置给Role对象
|
|
|
+ parentObj.transform.SetPositionAndRotation(gameObj.transform.localPosition, gameObj.transform.localRotation);
|
|
|
+ gameObj.transform.SetPositionAndRotation(new Vector3(), new Quaternion());
|
|
|
+ }
|
|
|
gameObj.name = objName;
|
|
|
gameObj.transform.SetParent(parentObj.transform, false);
|
|
|
var render = gameObj.GetComponent<CubismRenderController>();
|