zhaoyang 2 anni fa
parent
commit
30d6881277

+ 5 - 5
GameClient/Assets/Game/HotUpdate/DressUp/DressUpUtil.cs

@@ -13,7 +13,7 @@ namespace GFGGame
         private const string BODY_SPRITE_NAME = "Body";
         private const string BODY_SPRITE_NAME = "Body";
         private const string BODY_ANIMATION_NAME = "Body_a";
         private const string BODY_ANIMATION_NAME = "Body_a";
         private const string BODY_EFFECT_OBJ_NAME = "Body_eff";
         private const string BODY_EFFECT_OBJ_NAME = "Body_eff";
-        private const string FORMAT_SPRITE_NAME = "T{0}_s{1}";
+        public const string FORMAT_SPRITE_NAME = "T{0}_s{1}";
         private const string FORMAT_ANIMATION_NAME = "T{0}_a{1}";
         private const string FORMAT_ANIMATION_NAME = "T{0}_a{1}";
         private const string FORMAT_EFFECT_OBJ_NAME = "T{0}_eff";
         private const string FORMAT_EFFECT_OBJ_NAME = "T{0}_eff";
         private const string FORMAT_LAYER_RES_NAME_WITH_T = "{0}_t";
         private const string FORMAT_LAYER_RES_NAME_WITH_T = "{0}_t";
@@ -229,10 +229,10 @@ namespace GFGGame
             TryRemoveAnimationObj(parentObj, aniObjName);
             TryRemoveAnimationObj(parentObj, aniObjName);
             string ext = ItemUtil.GetItemResExt(itemCfg.itemType, itemCfg.subType);
             string ext = ItemUtil.GetItemResExt(itemCfg.itemType, itemCfg.subType);
             GameObject gameObject = AddSpriteObj(res, ext, spritObjName, parentObj, sortingOrder, needSetMask);
             GameObject gameObject = AddSpriteObj(res, ext, spritObjName, parentObj, sortingOrder, needSetMask);
-            if (itemCfg.subType == (int)ConstDressUpItemType.BEI_JING)
-            {
-                gameObject.layer = LayerMask.NameToLayer("Bg"); ;
-            }
+            // if (itemCfg.subType == (int)ConstDressUpItemType.BEI_JING)
+            // {
+            //     gameObject.layer = LayerMask.NameToLayer("Bg"); ;
+            // }
             if (itemCfg.isAni > 0 && showAni)
             if (itemCfg.isAni > 0 && showAni)
             {
             {
                 AddAnimationObj(res, aniObjName, parentObj, sortingOrder);
                 AddAnimationObj(res, aniObjName, parentObj, sortingOrder);

+ 7 - 2
GameClient/Assets/Game/HotUpdate/Views/DressUp/DressUpFightView.cs

@@ -427,8 +427,13 @@ namespace GFGGame
                 FieldFightDataManager.Instance.equipDatas = EquipDataCache.cacher.equipDatas;
                 FieldFightDataManager.Instance.equipDatas = EquipDataCache.cacher.equipDatas;
             }
             }
 
 
-            Camera camera = _sceneObject.transform.Find("Camera").gameObject.GetComponent<Camera>();
-            EquipDataCache.cacher.nTexture = DressUpUtil.GetPrintscreenNTexture(camera);
+            ItemCfg bgItemCfg = ItemCfgArray.Instance.GetCfg(EquipDataCache.cacher.bgId);
+            string bgName = string.Format(DressUpUtil.FORMAT_SPRITE_NAME, bgItemCfg.subType, 1);
+            GameObject bg = _sceneObject.transform.Find(bgName).gameObject;
+            bg.SetActive(false);
+            // Camera camera = _sceneObject.transform.Find("Camera").gameObject.GetComponent<Camera>();
+            EquipDataCache.cacher.nTexture = DressUpUtil.GetPrintscreenNTexture(Camera.main);
+            bg.SetActive(true);
             if (hasFightTarget)
             if (hasFightTarget)
             {
             {
                 ViewManager.Show(ViewName.STORY_FIGHT_TARGET_VIEW);
                 ViewManager.Show(ViewName.STORY_FIGHT_TARGET_VIEW);

+ 0 - 88
GameClient/Assets/ResIn/Prefab/SceneDressUpFight.prefab

@@ -1,92 +1,5 @@
 %YAML 1.1
 %YAML 1.1
 %TAG !u! tag:unity3d.com,2011:
 %TAG !u! tag:unity3d.com,2011:
---- !u!1 &1782485218948418575
-GameObject:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  serializedVersion: 6
-  m_Component:
-  - component: {fileID: 4137215948490320690}
-  - component: {fileID: 4998747912282688621}
-  - component: {fileID: 5803003715392645207}
-  m_Layer: 0
-  m_Name: Camera
-  m_TagString: Untagged
-  m_Icon: {fileID: 0}
-  m_NavMeshLayer: 0
-  m_StaticEditorFlags: 0
-  m_IsActive: 1
---- !u!4 &4137215948490320690
-Transform:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 1782485218948418575}
-  m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
-  m_LocalPosition: {x: 0, y: 0, z: 0}
-  m_LocalScale: {x: 1, y: 1, z: 1}
-  m_Children: []
-  m_Father: {fileID: 8934048990737965464}
-  m_RootOrder: 1
-  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
---- !u!20 &4998747912282688621
-Camera:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 1782485218948418575}
-  m_Enabled: 1
-  serializedVersion: 2
-  m_ClearFlags: 3
-  m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
-  m_projectionMatrixMode: 1
-  m_GateFitMode: 2
-  m_FOVAxisMode: 0
-  m_SensorSize: {x: 36, y: 24}
-  m_LensShift: {x: 0, y: 0}
-  m_FocalLength: 50
-  m_NormalizedViewPortRect:
-    serializedVersion: 2
-    x: 0
-    y: 0
-    width: 1
-    height: 1
-  near clip plane: -1
-  far clip plane: 1000
-  field of view: 60
-  orthographic: 1
-  orthographic size: 9.6
-  m_Depth: 0
-  m_CullingMask:
-    serializedVersion: 2
-    m_Bits: 23
-  m_RenderingPath: -1
-  m_TargetTexture: {fileID: 0}
-  m_TargetDisplay: 0
-  m_TargetEye: 0
-  m_HDR: 1
-  m_AllowMSAA: 0
-  m_AllowDynamicResolution: 0
-  m_ForceIntoRT: 0
-  m_OcclusionCulling: 0
-  m_StereoConvergence: 10
-  m_StereoSeparation: 0.022
---- !u!114 &5803003715392645207
-MonoBehaviour:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 1782485218948418575}
-  m_Enabled: 1
-  m_EditorHideFlags: 0
-  m_Script: {fileID: 11500000, guid: 03a74e9be952781499f1c48566c89209, type: 3}
-  m_Name: 
-  m_EditorClassIdentifier: 
 --- !u!1 &8934048990737965465
 --- !u!1 &8934048990737965465
 GameObject:
 GameObject:
   m_ObjectHideFlags: 0
   m_ObjectHideFlags: 0
@@ -115,7 +28,6 @@ Transform:
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_Children:
   m_Children:
   - {fileID: 8934048988926551774}
   - {fileID: 8934048988926551774}
-  - {fileID: 4137215948490320690}
   m_Father: {fileID: 0}
   m_Father: {fileID: 0}
   m_RootOrder: 0
   m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}