Browse Source

战斗表现修改

zhangyuqian 1 year ago
parent
commit
0ebd6e9fed

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Data/FightDataManager.cs

@@ -216,7 +216,7 @@ namespace GFGGame
             {
                 return ClickType.PERFECT_CLICK;
             }
-            if (scale <= 0.33f && scale > 0.23f)
+            if (scale <= 0.38f && scale > 0.27f)
             {
                 clickType = ClickType.PERFECT_CLICK;
             }

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

@@ -27,6 +27,8 @@ namespace GFGGame
         private int _prefectCount = 0;//卓越点击数量
         private bool _isAllPerfect = false;//登峰造极中
         private bool tryGuide = false;
+        //战斗表现修改,得分和星星偏移
+        private float offsetX = 150.0f;
 
         private EffectUI _effectUI1;
         private EffectUI _effectUI2;
@@ -172,10 +174,10 @@ namespace GFGGame
             StoryFightCfg fightCfg = StoryFightCfgArray.Instance.GetCfg(levelCfg.fightID);
             _ui.m_proScore.target.max = fightCfg.score3;
             _ui.m_proScore.m_comBar.target.width = 0;
-            _ui.m_proScore.m_comFirstScore.target.x = (((float)fightCfg.score1 / (float)fightCfg.score3)) * _ui.m_proScore.target.width;
-            _ui.m_proScore.m_comSecondScore.target.x = (((float)fightCfg.score2 / (float)fightCfg.score3)) * _ui.m_proScore.target.width;
-            _ui.m_proScore.m_comThirdScore.target.x = (((float)fightCfg.score3 / (float)fightCfg.score3)) * _ui.m_proScore.target.width;
-
+            _ui.m_proScore.m_comFirstScore.target.x = (((float)fightCfg.score1 / (float)fightCfg.score3)) * (_ui.m_proScore.target.width - offsetX);
+            _ui.m_proScore.m_comSecondScore.target.x = (((float)fightCfg.score2 / (float)fightCfg.score3)) * (_ui.m_proScore.target.width - offsetX);
+            _ui.m_proScore.m_comThirdScore.target.x = (((float)fightCfg.score3 / (float)fightCfg.score3)) * (_ui.m_proScore.target.width - offsetX);
+            _ui.m_proScore.m_holder.visible = false;
             _ui.m_proScore.m_txtCount.text = "总分 0";
             _ui.m_comClick.target.touchable = false;
             _ui.m_comClick.m_comAllPerfect.target.visible = false;
@@ -368,8 +370,9 @@ namespace GFGGame
         private void UpdateProgress(object param = null)
         {
             double proportion = _score / _ui.m_proScore.target.max;
-            float width = (float)(proportion * _ui.m_proScore.target.width);
+            float width = (float)(proportion * (_ui.m_proScore.target.width - offsetX));
             width = width > _ui.m_proScore.m_comBar.target.initWidth ? _ui.m_proScore.m_comBar.target.initWidth : width;
+            _ui.m_proScore.m_holder.visible = true;
             GTween.To(_ui.m_proScore.m_comBar.target.width, width, 0.3f).SetTarget(_ui.m_proScore.m_comBar).OnUpdate((GTweener t) =>
                 {
                     _ui.m_proScore.m_comBar.target.width = t.value.x;

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

@@ -49,13 +49,14 @@ namespace GFGGame
             MyDressUpHelper.dressUpObj.setSceneObj(_sceneObject);
             StoryLevelCfg levelCfg = StoryLevelCfgArray.Instance.GetCfg(InstanceZonesDataManager.currentLevelCfgId);
             StoryFightCfg fightCfg = StoryFightCfgArray.Instance.GetCfg(levelCfg.fightID);
-            if (!string.IsNullOrEmpty(fightCfg.music))
-            {
-                MusicManager.Instance.PlayCroutine(ResPathUtil.GetMusicPath(fightCfg.music, "mp3"));
-            }
+
             _ui.m_roleName.m_txtName.text = RoleDataManager.roleName;
             Timers.inst.Add(0.9f, 1, (object param) =>
             {
+                if (!string.IsNullOrEmpty(fightCfg.music))
+                {
+                    MusicManager.Instance.PlayCroutine(ResPathUtil.GetMusicPath(fightCfg.music, "mp3"));
+                }
                 ViewManager.Show<StoryFightSingleScoreView>();
                 this.Hide();
             });

+ 15 - 7
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryFightTargetView.cs

@@ -95,7 +95,7 @@ namespace GFGGame
 
                     _targetDressUpObj.PutOnItemList(targetFightData.itemList);
                 }
-                MusicManager.Instance.PlayCroutine(ResPathUtil.GetMusicPath("fight", "mp3"));
+                
 
             }
             else
@@ -110,18 +110,26 @@ namespace GFGGame
                 _ui.m_targetName.m_txtName.text = targetFightData.name;
                 SceneController.UpdateFightTarget(targetFightData.res, _sceneObject);
 
-                StoryLevelCfg levelCfg = StoryLevelCfgArray.Instance.GetCfg(InstanceZonesDataManager.currentLevelCfgId);
-                StoryFightCfg fightCfg = StoryFightCfgArray.Instance.GetCfg(levelCfg.fightID);
-                if (!string.IsNullOrEmpty(fightCfg.music))
-                {
-                    MusicManager.Instance.PlayCroutine(ResPathUtil.GetMusicPath(fightCfg.music, "mp3"));
-                }
+
             }
 
             _ui.m_roleName.m_txtName.text = roleFightData.name;
 
             Timers.inst.Add(1.1f, 1, (object param) =>
             {
+                if (InstanceZonesDataManager.FightScene == ConstInstanceZonesType.Arena)
+                {
+                    MusicManager.Instance.PlayCroutine(ResPathUtil.GetMusicPath("fight", "mp3"));
+                }
+                else
+                {
+                    StoryLevelCfg levelCfg = StoryLevelCfgArray.Instance.GetCfg(InstanceZonesDataManager.currentLevelCfgId);
+                    StoryFightCfg fightCfg = StoryFightCfgArray.Instance.GetCfg(levelCfg.fightID);
+                    if (!string.IsNullOrEmpty(fightCfg.music))
+                    {
+                        MusicManager.Instance.PlayCroutine(ResPathUtil.GetMusicPath(fightCfg.music, "mp3"));
+                    }
+                }
                 ViewManager.Show<StoryFightTargetScoreView>(new object[] { roleFightData, targetFightData });
                 this.Hide();
             });

BIN
GameClient/Assets/ResIn/UI/Main/Main_fui.bytes