Răsfoiți Sursa

添加战斗护盾特效

zhaoyang 3 ani în urmă
părinte
comite
ec87c0f5b7

+ 1 - 1
FGUIProject/assets/Main/StoryFightTargetScoreUI.xml

@@ -19,7 +19,7 @@
     </component>
     <component id="n15_mza1" name="comMineCircle" src="v3k9cv" fileName="components/comMineCircle.xml" xy="350,641" pivot="0.5,0.5" anchor="true" visible="false"/>
     <component id="n17_mza1" name="comTargetCircle" src="v3k9c4" fileName="components/comTargetCircle.xml" xy="730,641" pivot="0.5,0.5" anchor="true" visible="false"/>
-    <component id="n25_vbe8" name="ComShieldMine" src="v3k9c3" fileName="components/ComSkillShield.xml" xy="133,895"/>
+    <component id="n25_vbe8" name="ComShieldMine" src="v3k9c3" fileName="components/ComSkillShield.xml" xy="157,883"/>
     <component id="n27_vbe8" name="ComShieldNpc" src="v3k9c3" fileName="components/ComSkillShield.xml" xy="712,895"/>
     <component id="n24_vbe8" name="proMinusMine" src="mhyhd4" fileName="components/ProgressBar2.xml" xy="190,820">
       <ProgressBar value="100" max="100"/>

+ 6 - 1
FGUIProject/assets/Main/components/ComSkillShield.xml

@@ -1,6 +1,11 @@
 <?xml version="1.0" encoding="utf-8"?>
 <component size="244,237">
   <displayList>
-    <image id="n25_vbe8" name="img" src="8xpg3z" fileName="imagesStory/zd_drpf_fsz_1.png" xy="0,0"/>
+    <graph id="n26_tr2r" name="holder" xy="122,118" size="0,0" touchable="false">
+      <relation target="" sidePair="height-height"/>
+    </graph>
+    <graph id="n27_tr2r" name="holder1" xy="122,118" size="0,0" visible="false" touchable="false">
+      <relation target="" sidePair="height-height"/>
+    </graph>
   </displayList>
 </component>

+ 6 - 3
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Main/UI_ComSkillShield.cs

@@ -7,7 +7,8 @@ namespace UI.Main
     public partial class UI_ComSkillShield
     {
         public GComponent target;
-        public GImage m_img;
+        public GGraph m_holder;
+        public GGraph m_holder1;
         public const string URL = "ui://mfvz4q8kv3k9c3";
         public const string PACKAGE_NAME = "Main";
         public const string RES_NAME = "ComSkillShield";
@@ -55,11 +56,13 @@ namespace UI.Main
 
         private void Init(GComponent comp)
         {
-            m_img = (GImage)comp.GetChild("img");
+            m_holder = (GGraph)comp.GetChild("holder");
+            m_holder1 = (GGraph)comp.GetChild("holder1");
         }
         public void Dispose(bool disposeTarget = false)
         {
-            m_img = null;
+            m_holder = null;
+            m_holder1 = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 0 - 1
GameClient/Assets/Game/HotUpdate/Views/DressUp/PhotographView.cs

@@ -208,7 +208,6 @@ namespace GFGGame
             if (_ui.m_ComSelectRes.target.visible == true) return;
             //两根手指点击屏幕||两根手指点过屏幕
             if (Stage.inst.touchCount > 1 && hitParentGameObj != null) return;//只监听一根手指
-
             if (IsTouchUI) return;
 
             RaycastHit2D[] hit2Ds = Physics2D.RaycastAll(Camera.main.ScreenToWorldPoint(Input.mousePosition), Vector2.zero);

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

@@ -25,6 +25,14 @@ namespace GFGGame
         private const int _range = 30;//圆圈随机范围
         private float _time = 0;// 登峰造极按住的时间
 
+        private GameObject _effectObj0;
+        private GoWrapper _wrapper0;
+        private GameObject _effectObj0_1;
+        private GoWrapper _wrapper0_1;
+        private GameObject _effectObj1;
+        private GoWrapper _wrapper1;
+        private GameObject _effectObj1_1;
+        private GoWrapper _wrapper1_1;
         private Dictionary<int, RoleSkillCfg> _npcSkillDic;
 
         public override void Dispose()
@@ -83,6 +91,7 @@ namespace GFGGame
             _ui.m_targetName.m_txtName.text = fightCfg.targetName;
 
             UpdateNormal();
+            AddEffect();
 
             ScoreSystemData.Instance.SetEquipDicWithType();
             _npcSkillDic = SkillDataManager.Instance.GetNpcSkill();
@@ -103,6 +112,19 @@ namespace GFGGame
                 GComponent btnSkill = _ui.target.GetChild("btnSkill" + i).asCom;
             }
         }
+        private void AddEffect()
+        {
+            string resPath0 = ResPathUtil.GetViewEffectPath("ui_zhandou", "ui_zd_hd_sc");
+            SceneController.AddObjectToView(_effectObj0, _wrapper0, _ui.m_ComShieldMine.m_holder, resPath0, out _effectObj0, out _wrapper0);
+            SceneController.AddObjectToView(_effectObj0_1, _wrapper0_1, _ui.m_ComShieldMine.m_holder1, resPath0, out _effectObj0_1, out _wrapper0_1);
+            string resPath1 = ResPathUtil.GetViewEffectPath("ui_zhandou", "ui_zd_hd_ps");
+            SceneController.AddObjectToView(_effectObj1, _wrapper1, _ui.m_ComShieldNpc.m_holder, resPath1, out _effectObj1, out _wrapper1);
+            SceneController.AddObjectToView(_effectObj1_1, _wrapper1_1, _ui.m_ComShieldNpc.m_holder1, resPath1, out _effectObj1_1, out _wrapper1_1);
+            _ui.m_ComShieldMine.m_holder.visible = false;
+            _ui.m_ComShieldMine.m_holder1.visible = false;
+            _ui.m_ComShieldNpc.m_holder.visible = false;
+            _ui.m_ComShieldNpc.m_holder1.visible = false;
+        }
 
         private void CircleScoreStart(object param)
         {
@@ -275,9 +297,11 @@ namespace GFGGame
             comSkillMinus.TweenValue(100, 2f).OnComplete(() =>
             {
                 comSkillMinus.visible = false;
-                if (targetComSkillShield.target.visible)
+
+                if (targetComSkillShield.m_holder.visible)
                 {
-                    targetComSkillShield.target.visible = false;
+                    targetComSkillShield.m_holder.visible = false;
+                    targetComSkillShield.m_holder1.visible = true;
                     return;
                 }
 
@@ -335,9 +359,16 @@ namespace GFGGame
         private void UpdateShieldUI(RoleSkillCfg cfg, int role)
         {
             UI_ComSkillShield comSkillShield = role == SkillDataManager.MINE ? _ui.m_ComShieldMine : _ui.m_ComShieldNpc;
-            comSkillShield.target.visible = true;
 
-            Timers.inst.Add(cfg.duration, 1, (param) => { comSkillShield.target.visible = false; });
+            comSkillShield.m_holder.visible = true;
+            comSkillShield.m_holder1.visible = false;
+
+            Timers.inst.Add(cfg.duration, 1, (param) =>
+            {
+                // comSkillShield.target.visible = false;
+                comSkillShield.m_holder.visible = false;
+
+            });
         }
         private void OnBtnBackClick()
         {

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