Browse Source

战斗表现

zhaoyang 3 years ago
parent
commit
17b3cbd0c6

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

@@ -24,9 +24,9 @@
     <component id="n26_vbe8" name="proMinusNpc" src="mhyhd4" fileName="components/ProgressBar2.xml" xy="708,820">
       <ProgressBar value="100" max="100"/>
     </component>
-    <component id="n29_uj53" name="ComRoleSkillMineAdd" src="v3k9cx" fileName="components/ComRoleSkill.xml" xy="60,914"/>
+    <component id="n29_uj53" name="ComRoleSkillMineAdd" src="v3k9cx" fileName="components/ComRoleSkill.xml" xy="202,1030"/>
     <component id="n34_pcn0" name="ComRoleSkillMineMinus" src="lki4db" fileName="components/ComRoleSkill1.xml" xy="40,914" controller="c1,0"/>
-    <component id="n33_uj53" name="ComRoleSkillNpcAdd" src="v3k9cx" fileName="components/ComRoleSkill.xml" xy="590,914"/>
+    <component id="n33_uj53" name="ComRoleSkillNpcAdd" src="v3k9cx" fileName="components/ComRoleSkill.xml" xy="776,1030"/>
     <component id="n35_pcn0" name="ComRoleSkillNpcMinus" src="lki4db" fileName="components/ComRoleSkill1.xml" xy="40,914" controller="c1,1"/>
     <component id="n1_8xpg" name="selfName" src="8xpg41" fileName="components/CompFightResultName.xml" xy="48,1499">
       <relation target="" sidePair="bottom-bottom"/>

+ 8 - 8
FGUIProject/assets/Main/components/ComRoleSkill.xml

@@ -1,16 +1,16 @@
 <?xml version="1.0" encoding="utf-8"?>
-<component size="400,450">
+<component size="100,100">
   <displayList>
     <image id="n30_v3k9" name="n30" src="v3k9cb" fileName="imagesStory/zd_jinengdi_1.png" xy="128,0" pivot="0.5,0.5" size="243,243" group="n34_lki4" aspect="true"/>
     <text id="n33_lki4" name="txtResult" xy="94,123" pivot="0.5,0.5" anchor="true" size="68,114" group="n34_lki4" font="ui://mfvz4q8kvuz5b5" fontSize="110" color="#5dd05d" vars="true" text="+"/>
-    <text id="n29_uj53" name="txtScore" xy="249,122" pivot="0.5,0.5" anchor="true" size="203,74" group="n34_lki4" font="ui://mfvz4q8kvuz5b5" fontSize="70" color="#5dd05d" align="center" vars="true" autoSize="none" text="{count=9000}"/>
-    <group id="n34_lki4" name="n34" xy="60,0" size="311,243" advanced="true"/>
-    <image id="n31_v3k9" name="n31" src="v3k9cg" fileName="imagesStory/zd_jnsxzi_1.png" xy="100,357" pivot="0.5,0.5"/>
+    <group id="n34_lki4" name="n34" xy="60,0" size="311,243" visible="false" advanced="true"/>
+    <image id="n31_v3k9" name="n31" src="v3k9cg" fileName="imagesStory/zd_jnsxzi_1.png" xy="100,357" pivot="0.5,0.5" visible="false"/>
+    <graph id="n35_k1kh" name="holder" xy="0,0" pivot="0.5,0.5" size="100,100"/>
+    <text id="n29_uj53" name="txtScore" xy="85,-140" size="176,60" font="ui://mfvz4q8kk1khe6" fontSize="70" color="#5dd05d" align="center" vars="true" text="{count=9000}"/>
   </displayList>
   <transition name="t0">
-    <item time="0" type="Alpha" target="n34_lki4" value="0"/>
-    <item time="0" type="Scale" target="n31_v3k9" tween="true" startValue="1.6,1.6" endValue="1,1" duration="6" ease="Bounce.Out"/>
-    <item time="6" type="Alpha" target="n34_lki4" tween="true" startValue="1" endValue="0" duration="18" ease="Quart.In"/>
-    <item time="6" type="XY" target="n34_lki4" tween="true" startValue="60,0" endValue="60,-250" duration="18" ease="Linear"/>
+    <item time="0" type="Visible" target="n29_uj53" value="false"/>
+    <item time="18" type="Visible" target="n29_uj53" value="true"/>
+    <item time="36" type="Visible" target="n29_uj53" value="true"/>
   </transition>
 </component>

+ 6 - 6
FGUIProject/assets/Main/components/ComRoleSkill1.xml

@@ -1,14 +1,14 @@
 <?xml version="1.0" encoding="utf-8"?>
 <component size="1000,450">
-  <controller name="c1" exported="true" pages="0,,1," selected="1"/>
+  <controller name="c1" exported="true" pages="0,,1," selected="0"/>
   <displayList>
-    <image id="n30_v3k9" name="n30" src="v3k9cb" fileName="imagesStory/zd_jinengdi_1.png" xy="148,0" pivot="0.5,0.5" size="243,243" group="n34_lki4" aspect="true"/>
-    <text id="n33_lki4" name="txtResult" xy="114,123" pivot="0.5,0.5" anchor="true" size="68,114" group="n34_lki4" font="ui://mfvz4q8kvuz5b5" fontSize="110" color="#5dd05d" vars="true" text="-"/>
-    <text id="n29_uj53" name="txtScore" xy="269,121" pivot="0.5,0.5" anchor="true" size="203,74" group="n34_lki4" font="ui://mfvz4q8kvuz5b5" fontSize="70" color="#5dd05d" align="center" vars="true" autoSize="none" text="{count=90}"/>
-    <group id="n34_lki4" name="n34" xy="80,0" size="311,243" advanced="true">
+    <image id="n30_v3k9" name="n30" src="v3k9cb" fileName="imagesStory/zd_jinengdi_1.png" xy="678,0" pivot="0.5,0.5" size="243,243" group="n34_lki4" aspect="true"/>
+    <text id="n33_lki4" name="txtResult" xy="644,123" pivot="0.5,0.5" anchor="true" size="68,114" group="n34_lki4" font="ui://mfvz4q8kvuz5b5" fontSize="110" color="#5dd05d" vars="true" text="-"/>
+    <text id="n29_uj53" name="txtScore" xy="799,121" pivot="0.5,0.5" anchor="true" size="203,74" group="n34_lki4" font="ui://mfvz4q8kvuz5b5" fontSize="70" color="#5dd05d" align="center" vars="true" autoSize="none" text="{count=90}"/>
+    <group id="n34_lki4" name="n34" xy="610,0" size="311,243" advanced="true">
       <gearXY controller="c1" pages="1" values="80,0" default="610,0"/>
     </group>
-    <image id="n31_v3k9" name="n31" src="v3k9ch" fileName="imagesStory/zd_jnsxzi_2.png" xy="660,357" pivot="0.5,0.5">
+    <image id="n31_v3k9" name="n31" src="v3k9ch" fileName="imagesStory/zd_jnsxzi_2.png" xy="120,357" pivot="0.5,0.5">
       <gearXY controller="c1" pages="0" values="120,357" default="660,357"/>
     </image>
   </displayList>

+ 3 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Main/UI_ComRoleSkill.cs

@@ -8,6 +8,7 @@ namespace UI.Main
     {
         public GComponent target;
         public GTextField m_txtResult;
+        public GGraph m_holder;
         public GTextField m_txtScore;
         public Transition m_t0;
         public const string URL = "ui://mfvz4q8kv3k9cx";
@@ -58,12 +59,14 @@ namespace UI.Main
         private void Init(GComponent comp)
         {
             m_txtResult = (GTextField)comp.GetChild("txtResult");
+            m_holder = (GGraph)comp.GetChild("holder");
             m_txtScore = (GTextField)comp.GetChild("txtScore");
             m_t0 = comp.GetTransition("t0");
         }
         public void Dispose(bool disposeTarget = false)
         {
             m_txtResult = null;
+            m_holder = null;
             m_txtScore = null;
             m_t0 = null;
             if(disposeTarget && target != null)

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

@@ -34,6 +34,10 @@ namespace GFGGame
         private GoWrapper _wrapper2;
         private GameObject _gameObject3;
         private GoWrapper _wrapper3;
+        private GameObject _gameObject4;
+        private GoWrapper _wrapper4;
+        private GameObject _gameObject5;
+        private GoWrapper _wrapper5;
         private Dictionary<int, RoleSkillCfg> _npcSkillDic;
 
         private bool playStop = false;
@@ -170,6 +174,9 @@ namespace GFGGame
             string resPath1 = ResPathUtil.GetViewEffectPath("ui_zhandou", "ui_zd_hd_ps");
             SceneController.AddObjectToView(_gameObject1, _wrapper1, _ui.m_ComShieldMine.m_holder1, resPath1, out _gameObject1, out _wrapper1);
             SceneController.AddObjectToView(_gameObject3, _wrapper3, _ui.m_ComShieldNpc.m_holder1, resPath1, out _gameObject3, out _wrapper3);
+            string resPath2 = ResPathUtil.GetViewEffectPath("ui_zhandou", "ui_zd_tb_tg");
+            SceneController.AddObjectToView(_gameObject4, _wrapper4, _ui.m_ComRoleSkillMineAdd.m_holder, resPath2, out _gameObject4, out _wrapper4, 70);
+            SceneController.AddObjectToView(_gameObject5, _wrapper5, _ui.m_ComRoleSkillNpcAdd.m_holder, resPath2, out _gameObject5, out _wrapper5, 70);
             _ui.m_ComShieldMine.m_holder.visible = false;
             _ui.m_ComShieldMine.m_holder1.visible = false;
             _ui.m_ComShieldNpc.m_holder.visible = false;
@@ -225,8 +232,6 @@ namespace GFGGame
             _ui.m_proScore.m_comBar.m_imgAni.visible = true;
 
             double proportion = _score / (_score + _targetScore);
-            // double value = proportion * _ui.m_proScore.target.max;
-            // _ui.m_proScore.target.TweenValue(value, 0.5f);
             float width = (float)(proportion * _ui.m_proScore.target.width);
 
             GTween.To(_ui.m_proScore.m_comBar.target.width, width, 0.5f).SetTarget(_ui.m_proScore.m_comBar).OnUpdate((GTweener t) =>
@@ -234,11 +239,7 @@ namespace GFGGame
                     _ui.m_proScore.m_comBar.target.width = t.value.x;
                 }); ;
 
-            // if (twener != null)
-            // {
-            //     twener.Kill();
-            // }
-            // _ui.m_proScore.m_imgAni.x = (float)(proportion * _ui.m_proScore.target.width);// SetPosition(proportion* _ui.m_proScore.target.width,);
+
         }
         //释放NPC技能
         private void ReleaseNpcSkill()

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