瀏覽代碼

Revert "战斗结算"

This reverts commit 24bb006c4abfac842b4f4b460fe0597f9f1b75c2.
zhaoyang 2 年之前
父節點
當前提交
6bebbd5590

+ 2 - 1
GameClient/Assets/Game/HotUpdate/DressUp/DressUpObjDataCache.cs

@@ -42,7 +42,8 @@ namespace GFGGame
             }
             }
         }
         }
 
 
-        public NTexture nTexture;
+        public byte[] FightRoleRes { get; set; }
+        public Texture RoleTextuex { get; set; }
 
 
         private List<int> _equipDatas = new List<int>();
         private List<int> _equipDatas = new List<int>();
         public List<int> equipDatas
         public List<int> equipDatas

+ 3 - 4
GameClient/Assets/Game/HotUpdate/ServerProxy/InstanceZonesSProxy.cs

@@ -3,7 +3,6 @@ using System.Collections.Generic;
 using System.Linq;
 using System.Linq;
 using System.Text;
 using System.Text;
 using ET;
 using ET;
-using FairyGUI;
 
 
 namespace GFGGame
 namespace GFGGame
 {
 {
@@ -62,7 +61,7 @@ namespace GFGGame
         }
         }
 
 
         //完成剧情战斗关卡
         //完成剧情战斗关卡
-        public static async ETTask FinishStoryFightLevel(int levelCfgId, int score, int npcScore, bool useRecomend, NTexture nTexture)
+        public static async ETTask FinishStoryFightLevel(int levelCfgId, int score, int npcScore, bool useRecomend)
         {
         {
             M2C_FinishInstanceZonesFightLevel response = null;
             M2C_FinishInstanceZonesFightLevel response = null;
             response = (M2C_FinishInstanceZonesFightLevel)await MessageHelper.SendToServer(new C2M_FinishInstanceZonesFightLevel()
             response = (M2C_FinishInstanceZonesFightLevel)await MessageHelper.SendToServer(new C2M_FinishInstanceZonesFightLevel()
@@ -96,14 +95,14 @@ namespace GFGGame
                         isFirstFinish = true;
                         isFirstFinish = true;
                     }
                     }
                     InstanceZonesDataManager.TrySetLevelPass(response.LevelCfgId);
                     InstanceZonesDataManager.TrySetLevelPass(response.LevelCfgId);
-                    ViewManager.Show(ViewName.STORY_FIGHT_RESULT_VIEW, new object[] {new StoryFightResultData
+                    ViewManager.Show(ViewName.STORY_FIGHT_RESULT_VIEW, new StoryFightResultData
                     {
                     {
                         Result = true,
                         Result = true,
                         Score = response.Score,
                         Score = response.Score,
                         FirstPass = response.HasOnceBonus,
                         FirstPass = response.HasOnceBonus,
                         Star = response.Star,
                         Star = response.Star,
                         BonusList = bonusList
                         BonusList = bonusList
-                    },nTexture}, null, true);
+                    }, null, true);
                     if (response.HasOnceBonus)
                     if (response.HasOnceBonus)
                     {
                     {
                         FunctionOpenDataManager.Instance.CheckHasChapterFunOpen(response.LevelCfgId);
                         FunctionOpenDataManager.Instance.CheckHasChapterFunOpen(response.LevelCfgId);

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

@@ -437,15 +437,16 @@ namespace GFGGame
             Texture2D tex = new Texture2D((int)rect.width, (int)rect.height, TextureFormat.ARGB32, false);//新建一个Texture2D对象
             Texture2D tex = new Texture2D((int)rect.width, (int)rect.height, TextureFormat.ARGB32, false);//新建一个Texture2D对象
             tex.ReadPixels(rect, 0, 0);//读取像素,屏幕左下角为0点
             tex.ReadPixels(rect, 0, 0);//读取像素,屏幕左下角为0点
             tex.Apply();//保存像素信息
             tex.Apply();//保存像素信息
-            NTexture _nTexture = new NTexture(tex);
-            // EquipDataCache.cacher.nTexture = _nTexture;
+            // NTexture _nTexture = new NTexture(tex);
+            // EquipDataCache.cacher.FightRoleRes = tex.EncodeToJPG();
+            EquipDataCache.cacher.RoleTextuex = tex;
             GRoot.inst.visible = true;
             GRoot.inst.visible = true;
             bg.SetActive(true);
             bg.SetActive(true);
             Camera.main.backgroundColor = backgroundColor;
             Camera.main.backgroundColor = backgroundColor;
 
 
-            StartCalculateScore(_nTexture);
+            StartCalculateScore();
         }
         }
-        private void StartCalculateScore(NTexture nTexture)
+        private void StartCalculateScore()
         {
         {
             //不可移动代码位置
             //不可移动代码位置
             bool hasFightTarget = _fightCfg.targetName != null && _fightCfg.targetName.Length > 0;
             bool hasFightTarget = _fightCfg.targetName != null && _fightCfg.targetName.Length > 0;
@@ -460,11 +461,11 @@ namespace GFGGame
 
 
             if (hasFightTarget)
             if (hasFightTarget)
             {
             {
-                ViewManager.Show(ViewName.STORY_FIGHT_TARGET_VIEW, nTexture);
+                ViewManager.Show(ViewName.STORY_FIGHT_TARGET_VIEW);
             }
             }
             else
             else
             {
             {
-                ViewManager.Show(ViewName.STORY_FIGHT_SINGLE_VIEW, nTexture);
+                ViewManager.Show(ViewName.STORY_FIGHT_SINGLE_VIEW);
             }
             }
             this.Hide();
             this.Hide();
 
 

+ 4 - 5
GameClient/Assets/Game/HotUpdate/Views/MainStory/InstanceZonesController.cs

@@ -1,5 +1,4 @@
 using ET;
 using ET;
-using FairyGUI;
 using System;
 using System;
 using System.Collections.Generic;
 using System.Collections.Generic;
 using System.Linq;
 using System.Linq;
@@ -56,7 +55,7 @@ namespace GFGGame
 
 
 
 
 
 
-        public static async ETTask CheckStoryFightResult(NTexture nTexture)
+        public static async ETTask CheckStoryFightResult()
         {
         {
             StoryLevelCfg storyLevelCfg = StoryLevelCfgArray.Instance.GetCfg(InstanceZonesDataManager.currentLevelCfgId);
             StoryLevelCfg storyLevelCfg = StoryLevelCfgArray.Instance.GetCfg(InstanceZonesDataManager.currentLevelCfgId);
             if (storyLevelCfg.type == ConstInstanceZonesType.Studio && storyLevelCfg.subType == ConstInstanceZonesSubType.Hard3)
             if (storyLevelCfg.type == ConstInstanceZonesType.Studio && storyLevelCfg.subType == ConstInstanceZonesSubType.Hard3)
@@ -71,17 +70,17 @@ namespace GFGGame
             var success = InstanceZonesDataManager.GetFightResult(score, out var npcScore);
             var success = InstanceZonesDataManager.GetFightResult(score, out var npcScore);
             if (success)
             if (success)
             {
             {
-                await InstanceZonesSProxy.FinishStoryFightLevel(InstanceZonesDataManager.currentLevelCfgId, score, npcScore, InstanceZonesDataManager.usedRecommend,nTexture);
+                await InstanceZonesSProxy.FinishStoryFightLevel(InstanceZonesDataManager.currentLevelCfgId, score, npcScore, InstanceZonesDataManager.usedRecommend);
             }
             }
             else
             else
             {
             {
-                ViewManager.Show(ViewName.STORY_FIGHT_RESULT_VIEW, new object[]{ new StoryFightResultData
+                ViewManager.Show(ViewName.STORY_FIGHT_RESULT_VIEW, new StoryFightResultData
                 {
                 {
                     Result = false,
                     Result = false,
                     Score = score,
                     Score = score,
                     FirstPass = false,
                     FirstPass = false,
                     Star = 0
                     Star = 0
-                },nTexture}, null, true);
+                }, null, true);
                 //失败仅判断并更新最高分
                 //失败仅判断并更新最高分
                 if (score > InstanceZonesDataManager.GetScoreHighest(InstanceZonesDataManager.currentCardId))
                 if (score > InstanceZonesDataManager.GetScoreHighest(InstanceZonesDataManager.currentCardId))
                 {
                 {

+ 3 - 3
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryFightSingleScoreView.cs

@@ -79,7 +79,7 @@ namespace GFGGame
             ScoreSystemData.Instance.SetEquipDicWithType();
             ScoreSystemData.Instance.SetEquipDicWithType();
 
 
             _ui.m_comClickCircle.target.touchable = false;
             _ui.m_comClickCircle.target.touchable = false;
-            _ui.m_loaRole.texture = this.viewData as NTexture;
+            _ui.m_loaRole.texture = new NTexture(EquipDataCache.cacher.RoleTextuex);// EquipDataCache.cacher.FightRoleRes;
             // _ui.m_loaRole.SetSize(_ui.m_loaRole.width, _ui.m_loaRole.texture.height * _ui.m_loaRole.width / _ui.m_loaRole.texture.width);
             // _ui.m_loaRole.SetSize(_ui.m_loaRole.width, _ui.m_loaRole.texture.height * _ui.m_loaRole.width / _ui.m_loaRole.texture.width);
 
 
             _ui.m_btnSpeedUp.visible = EquipDataCache.cacher.autoPlay;
             _ui.m_btnSpeedUp.visible = EquipDataCache.cacher.autoPlay;
@@ -190,7 +190,7 @@ namespace GFGGame
             if (_index >= FightScoreCfgArray.Instance.dataArray.Length)
             if (_index >= FightScoreCfgArray.Instance.dataArray.Length)
             {
             {
                 GetCurStar(out int star, out Transition transition);
                 GetCurStar(out int star, out Transition transition);
-                _ui.m_comRoleResult.m_comRole.m_loaRole.texture = EquipDataCache.cacher.nTexture;
+                _ui.m_comRoleResult.m_comRole.m_loaRole.texture = new NTexture(EquipDataCache.cacher.RoleTextuex); ;
                 _ui.m_comRoleResult.m_c1.selectedIndex = 0;
                 _ui.m_comRoleResult.m_c1.selectedIndex = 0;
                 _ui.m_LoaMask.touchable = true;
                 _ui.m_LoaMask.touchable = true;
                 _ui.m_t3.Play();
                 _ui.m_t3.Play();
@@ -251,7 +251,7 @@ namespace GFGGame
         {
         {
             // Reset();
             // Reset();
 
 
-            InstanceZonesController.CheckStoryFightResult(this.viewData as NTexture).Coroutine();
+            InstanceZonesController.CheckStoryFightResult().Coroutine();
         }
         }
         private void OnBtnBackClick()
         private void OnBtnBackClick()
         {
         {

+ 1 - 2
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryFightSingleView.cs

@@ -55,11 +55,10 @@ namespace GFGGame
                 MusicManager.Instance.Play(ResPathUtil.GetMusicPath(fightCfg.music, "mp3"));
                 MusicManager.Instance.Play(ResPathUtil.GetMusicPath(fightCfg.music, "mp3"));
             }
             }
             _ui.m_roleName.m_txtName.text = RoleDataManager.roleName;
             _ui.m_roleName.m_txtName.text = RoleDataManager.roleName;
-            NTexture nTexture = this.viewData as NTexture;
             Timers.inst.Add(0.9f, 1, (object param) =>
             Timers.inst.Add(0.9f, 1, (object param) =>
             {
             {
                 this.Hide();
                 this.Hide();
-                ViewManager.Show(ViewName.STORY_FIGHT_SINGLE_SCORE_VIEW, nTexture);
+                ViewManager.Show(ViewName.STORY_FIGHT_SINGLE_SCORE_VIEW);
             });
             });
         }
         }
 
 

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryFightTargetScoreView.cs

@@ -697,7 +697,7 @@ namespace GFGGame
         }
         }
         private void Skip(object param = null)
         private void Skip(object param = null)
         {
         {
-            InstanceZonesController.CheckStoryFightResult(this.viewData as NTexture).Coroutine();
+            InstanceZonesController.CheckStoryFightResult().Coroutine();
         }
         }
         private void Reset()
         private void Reset()
         {
         {

+ 1 - 2
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryFightTargetView.cs

@@ -58,11 +58,10 @@ namespace GFGGame
             }
             }
             _ui.m_roleName.m_txtName.text = RoleDataManager.roleName;
             _ui.m_roleName.m_txtName.text = RoleDataManager.roleName;
             _ui.m_targetName.m_txtName.text = fightCfg.targetName;
             _ui.m_targetName.m_txtName.text = fightCfg.targetName;
-            NTexture nTexture = this.viewData as NTexture;
             Timers.inst.Add(1.1f, 1, (object param) =>
             Timers.inst.Add(1.1f, 1, (object param) =>
             {
             {
                 this.Hide();
                 this.Hide();
-                ViewManager.Show(ViewName.STORY_FIGHT_TARGET_SCORE_VIEW, nTexture);
+                ViewManager.Show(ViewName.STORY_FIGHT_TARGET_SCORE_VIEW);
             });
             });
         }
         }
 
 

+ 2 - 3
GameClient/Assets/Game/HotUpdate/Views/MainStory/StroyFightResultView.cs

@@ -72,16 +72,15 @@ namespace GFGGame
         protected override void OnShown()
         protected override void OnShown()
         {
         {
             base.OnShown();
             base.OnShown();
-            _resultData = (StoryFightResultData)(this.viewData as object[])[0];
+            _resultData = (StoryFightResultData)this.viewData;
 
 
             InstanceZonesDataManager.usedRecommend = false;
             InstanceZonesDataManager.usedRecommend = false;
             InstanceZonesDataManager.isResultFighting = true;
             InstanceZonesDataManager.isResultFighting = true;
 
 
             _ui.m_ComRoleResult.m_c1.selectedIndex = _resultData.Star;
             _ui.m_ComRoleResult.m_c1.selectedIndex = _resultData.Star;
 
 
-            NTexture nTexture = (this.viewData as object[])[1] as NTexture;
             GLoader loaRole = _ui.m_ComRoleResult.m_comRole.m_loaRole;
             GLoader loaRole = _ui.m_ComRoleResult.m_comRole.m_loaRole;
-            loaRole.texture = nTexture;
+            loaRole.texture = new NTexture(EquipDataCache.cacher.RoleTextuex); ;
             loaRole.alpha = 1;
             loaRole.alpha = 1;
 
 
             // loaRole.SetSize(loaRole.width, loaRole.texture.height * loaRole.width / loaRole.texture.width);
             // loaRole.SetSize(loaRole.width, loaRole.texture.height * loaRole.width / loaRole.texture.width);