浏览代码

对战技能添加注释

zhaoyang 3 年之前
父节点
当前提交
301ae2b8f0

+ 0 - 54
GameClient/Assets/Game/HotUpdate/Data/SkillDataManager.cs

@@ -42,60 +42,6 @@ namespace GFGGame
             skillData[skillId].lv += 1;
         }
 
-        // public BuffData mineBuffData = new BuffData();
-        // public BuffData npcBuffData = new BuffData();
-        // //更新对战主动技能数据
-        // public void UpdateTargetFightSkillValue(RoleSkillCfg cfg, int role, double mineScore)
-        // {
-        //     int score = 0;
-        //     int targetScore = 0;
-        //     BuffData buffData;
-        //     BuffData targetBuffData;
-        //     if (role == MINE)
-        //     {
-        //         score = EquipDataCache.cacher.totalScore;
-        //         targetScore = EquipDataCache.cacher.npcTotalScore;
-        //         buffData = mineBuffData;
-        //         targetBuffData = npcBuffData;
-        //     }
-        //     else
-        //     {
-        //         score = EquipDataCache.cacher.npcTotalScore;
-        //         targetScore = EquipDataCache.cacher.totalScore;
-        //         buffData = npcBuffData;
-        //         targetBuffData = mineBuffData;
-        //     }
-        //     switch (cfg.buff)
-        //     {
-        //         case SKILL_ADD:
-        //             if (buffData.addCount >= cfg.limiteCount) return;
-        //             buffData.addCount++;
-        //             score += (int)mineScore * cfg.value / 100;
-        //             break;
-        //         case SKILL_MINUS:
-        //             if (buffData.minusCount >= cfg.limiteCount) return;
-        //             buffData.minusCount++;
-        //             if (targetBuffData.isShield)
-        //             {
-        //                 targetBuffData.isShield = false;
-        //                 return;
-        //             }
-        //             targetScore -= (int)mineScore * cfg.value / 100;
-
-        //             break;
-        //         case SKILL_BREAK:
-        //             if (buffData.breakCount >= cfg.limiteCount) return;
-        //             buffData.breakCount++;
-        //             break;
-        //         case SKILL_SHIELD:
-        //             if (buffData.shieldCount >= cfg.limiteCount) return;
-
-        //             buffData.shieldCount++;
-        //             buffData.isShield = true;
-        //             break;
-        //     }
-        // }
-
         //获取npc释放技能顺序
         public Dictionary<int, RoleSkillCfg> GetNpcSkill()
         {

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

@@ -92,7 +92,7 @@ namespace GFGGame
             _mainScore = ScoreSystemData.Instance.GetMainScore();
             _targetMainScore = fightCfg.targetMainScore;
 
-            Timers.inst.Add(0.5f, 1, CircleScoreStart);//评分结束
+            Timers.inst.Add(0.5f, 1, CircleScoreStart);//评分开始
         }
         private void UpdateNormal()
         {
@@ -101,7 +101,6 @@ namespace GFGGame
             for (int i = 0; i < roleSkillCfgs.Length; i++)
             {
                 GComponent btnSkill = _ui.target.GetChild("btnSkill" + i).asCom;
-                // btnSkill.GetTransition("t0").Play(1, 0, null);
             }
         }
 
@@ -124,6 +123,7 @@ namespace GFGGame
         }
 
 
+        //更新部件评分结果,播放结果动画
         private void UpdateCircleResult()
         {
             int partId = FightScoreCfgArray.Instance.dataArray[_index].id;
@@ -141,9 +141,10 @@ namespace GFGGame
             EquipDataCache.cacher.npcTotalScore = (int)Math.Round(_targetScore);
 
             UpdateProgressBar();
-            PlayScoreAni();
             ReleaseNpcSkill();
+            PlayScoreAni();
         }
+        //顶部评分进度条
         private void UpdateProgressBar()
         {
             _ui.m_proScore.m_txtMineScore.text = ((int)_score).ToString();
@@ -151,6 +152,14 @@ namespace GFGGame
             double value = _score / (_score + _targetScore) * _ui.m_proScore.target.max;
             _ui.m_proScore.target.TweenValue(value, 0.5f);
         }
+        //释放NPC技能
+        private void ReleaseNpcSkill()
+        {
+            if (_npcSkillDic.ContainsKey(_index))
+            {
+                SetSkillValue(_npcSkillDic[_index], SkillDataManager.NPC);
+            }
+        }
         private void PlayScoreAni()
         {
             _ui.m_comMineCircle.target.visible = true;
@@ -163,6 +172,7 @@ namespace GFGGame
         }
         private void CircleScoreEnd()
         {
+            //当前部件评分结束
             _index++;
             if (_index >= FightScoreCfgArray.Instance.dataArray.Length)
             {
@@ -175,13 +185,7 @@ namespace GFGGame
                 Timers.inst.Add(0.5f, 1, CircleScoreStart);//评分结束
             }
         }
-        private void ReleaseNpcSkill()
-        {
-            if (_npcSkillDic.ContainsKey(_index))
-            {
-                SetSkillValue(_npcSkillDic[_index], SkillDataManager.NPC);
-            }
-        }
+
 
         /***************************************************主动技能**************************************************/