Kaynağa Gözat

战斗进度条特效

zhaoyang 2 yıl önce
ebeveyn
işleme
690d15103f

+ 2 - 4
FGUIProject/assets/Main/components/ComScoreStage.xml

@@ -1,14 +1,12 @@
 <?xml version="1.0" encoding="utf-8"?>
 <component size="70,80">
-  <controller name="c1" pages="0,,1," selected="0"/>
+  <controller name="c1" pages="0,,1," selected="1"/>
   <displayList>
     <loader id="n6_v95q" name="icon" xy="0,19" size="70,70" url="ui://mfvz4q8kv95qi6" autoSize="true">
       <gearDisplay controller="c1" pages="0"/>
     </loader>
-    <loader id="n7_v95q" name="icon1" xy="0,19" size="70,70" url="ui://mfvz4q8kv95qi9" autoSize="true">
-      <gearDisplay controller="c1" pages="1"/>
-    </loader>
     <image id="n8_v95q" name="n8" src="v95qib" fileName="imagesStory/zd_jdbiao.png" xy="16,-7"/>
+    <graph id="n9_weok" name="holder" xy="36,63" size="1,1"/>
   </displayList>
   <customProperty target="icon" propertyId="1"/>
   <customProperty target="icon1" propertyId="1"/>

+ 0 - 4
FGUIProject/assets/Main/components/Component2.xml

@@ -4,9 +4,5 @@
     <component id="n1_uj53" name="bar" src="k1khe8" fileName="components/Component3.xml" xy="0,0" size="837,31">
       <relation target="" sidePair="width-width"/>
     </component>
-    <graph id="n7_k1kh" name="holder" xy="834,11" pivot="0.5,0.5" size="1,1">
-      <relation target="" sidePair="right-right"/>
-    </graph>
-    <graph id="n8_ecw3" name="holder1" xy="417,11" pivot="0.5,0.5" size="1,1"/>
   </displayList>
 </component>

+ 4 - 0
FGUIProject/assets/Main/components/ProgressBar1.xml

@@ -22,6 +22,10 @@
     <image id="n10_v95q" name="imgAni" src="k1khdp" fileName="imagesStory/zd_zdjdt_liang.png" xy="834,14" pivot="0.518,0.438" anchor="true">
       <relation target="n5_rlp9" sidePair="right-right"/>
     </image>
+    <graph id="n12_weok" name="holder" xy="834,14" pivot="0.5,0.5" anchor="true" size="100,100">
+      <relation target="n5_rlp9" sidePair="right-right"/>
+    </graph>
+    <graph id="n13_weok" name="holder1" xy="417,14" pivot="0.5,0.5" size="1,1"/>
   </displayList>
   <ProgressBar titleType="value"/>
 </component>

+ 10 - 6
FGUIProject/assets/Main/components/ProgressBarTargetScore.xml

@@ -1,20 +1,24 @@
 <?xml version="1.0" encoding="utf-8"?>
-<component size="836,27" extention="ProgressBar">
+<component size="836,31" extention="ProgressBar">
   <displayList>
-    <image id="n0_uj53" name="n0" src="v95qi1" fileName="imagesStory/zd_zdjdt_4.png" xy="0,0">
+    <image id="n0_uj53" name="n0" src="v95qi1" fileName="imagesStory/zd_zdjdt_4.png" xy="0,0" size="836,31">
       <relation target="" sidePair="width-width,height-height"/>
     </image>
-    <component id="n1_uj53" name="comBar" src="k1khe7" fileName="components/Component2.xml" xy="0,-2" size="769,31"/>
+    <component id="n1_uj53" name="comBar" src="k1khe7" fileName="components/Component2.xml" xy="0,-2" size="0,31"/>
     <image id="n7_v3k9" name="n7" src="v3k9cs" fileName="imagesStory/zd_zdjdt_3.png" xy="-17,-2"/>
-    <text id="n4_uj53" name="txtMineScore" xy="10,50" size="193,49" fontSize="36" color="#fff6e3" vAlign="bottom" bold="true" strokeColor="#c09653" strokeSize="2" text="赵四10086">
+    <text id="n4_uj53" name="txtMineScore" xy="10,50" size="193,53" fontSize="36" color="#fff6e3" vAlign="bottom" bold="true" strokeColor="#c09653" strokeSize="2" text="赵四10086">
       <relation target="" sidePair="width-width,height-height"/>
     </text>
-    <text id="n5_uj53" name="txtNpcScore" xy="826,50" pivot="1,0" anchor="true" size="230,49" fontSize="36" color="#fff6e3" align="right" vAlign="bottom" bold="true" strokeColor="#c09653" strokeSize="2" text="小宫女10086">
+    <text id="n5_uj53" name="txtNpcScore" xy="826,50" pivot="1,0" anchor="true" size="230,53" fontSize="36" color="#fff6e3" align="right" vAlign="bottom" bold="true" strokeColor="#c09653" strokeSize="2" text="小宫女10086">
       <relation target="" sidePair="width-width,height-height"/>
     </text>
-    <image id="n8_v95q" name="imgAni" src="k1khdp" fileName="imagesStory/zd_zdjdt_liang.png" xy="768,14" pivot="0.518,0.438" anchor="true">
+    <image id="n8_v95q" name="imgAni" src="k1khdp" fileName="imagesStory/zd_zdjdt_liang.png" xy="-1,14" pivot="0.518,0.438" anchor="true">
       <relation target="n1_uj53" sidePair="right-right"/>
     </image>
+    <graph id="n9_weok" name="holder" xy="-1,16" pivot="0.5,0.5" anchor="true" size="100,100">
+      <relation target="n1_uj53" sidePair="right-right"/>
+    </graph>
+    <graph id="n10_weok" name="holder1" xy="417,14" pivot="0.5,0.5" size="1,1"/>
   </displayList>
   <ProgressBar/>
 </component>

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

@@ -9,7 +9,7 @@ namespace UI.Main
         public GComponent target;
         public Controller m_c1;
         public GLoader m_icon;
-        public GLoader m_icon1;
+        public GGraph m_holder;
         public const string URL = "ui://mfvz4q8kwonogr";
         public const string PACKAGE_NAME = "Main";
         public const string RES_NAME = "ComScoreStage";
@@ -59,13 +59,13 @@ namespace UI.Main
         {
             m_c1 = comp.GetController("c1");
             m_icon = (GLoader)comp.GetChild("icon");
-            m_icon1 = (GLoader)comp.GetChild("icon1");
+            m_holder = (GGraph)comp.GetChild("holder");
         }
         public void Dispose(bool disposeTarget = false)
         {
             m_c1 = null;
             m_icon = null;
-            m_icon1 = null;
+            m_holder = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 0 - 6
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Main/UI_Component2.cs

@@ -8,8 +8,6 @@ namespace UI.Main
     {
         public GComponent target;
         public UI_Component3 m_bar;
-        public GGraph m_holder;
-        public GGraph m_holder1;
         public const string URL = "ui://mfvz4q8kk1khe7";
         public const string PACKAGE_NAME = "Main";
         public const string RES_NAME = "Component2";
@@ -58,15 +56,11 @@ namespace UI.Main
         private void Init(GComponent comp)
         {
             m_bar = (UI_Component3)UI_Component3.Create(comp.GetChild("bar"));
-            m_holder = (GGraph)comp.GetChild("holder");
-            m_holder1 = (GGraph)comp.GetChild("holder1");
         }
         public void Dispose(bool disposeTarget = false)
         {
             m_bar.Dispose();
             m_bar = null;
-            m_holder = null;
-            m_holder1 = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 6 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Main/UI_ProgressBar1.cs

@@ -13,6 +13,8 @@ namespace UI.Main
         public UI_ComScoreStage m_comSecondScore;
         public UI_ComScoreStage m_comThirdScore;
         public GImage m_imgAni;
+        public GGraph m_holder;
+        public GGraph m_holder1;
         public const string URL = "ui://mfvz4q8kvuz5bh";
         public const string PACKAGE_NAME = "Main";
         public const string RES_NAME = "ProgressBar1";
@@ -66,6 +68,8 @@ namespace UI.Main
             m_comSecondScore = (UI_ComScoreStage)UI_ComScoreStage.Create(comp.GetChild("comSecondScore"));
             m_comThirdScore = (UI_ComScoreStage)UI_ComScoreStage.Create(comp.GetChild("comThirdScore"));
             m_imgAni = (GImage)comp.GetChild("imgAni");
+            m_holder = (GGraph)comp.GetChild("holder");
+            m_holder1 = (GGraph)comp.GetChild("holder1");
         }
         public void Dispose(bool disposeTarget = false)
         {
@@ -79,6 +83,8 @@ namespace UI.Main
             m_comThirdScore.Dispose();
             m_comThirdScore = null;
             m_imgAni = null;
+            m_holder = null;
+            m_holder1 = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 6 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Main/UI_ProgressBarTargetScore.cs

@@ -11,6 +11,8 @@ namespace UI.Main
         public GTextField m_txtMineScore;
         public GTextField m_txtNpcScore;
         public GImage m_imgAni;
+        public GGraph m_holder;
+        public GGraph m_holder1;
         public const string URL = "ui://mfvz4q8kv3k9c7";
         public const string PACKAGE_NAME = "Main";
         public const string RES_NAME = "ProgressBarTargetScore";
@@ -62,6 +64,8 @@ namespace UI.Main
             m_txtMineScore = (GTextField)comp.GetChild("txtMineScore");
             m_txtNpcScore = (GTextField)comp.GetChild("txtNpcScore");
             m_imgAni = (GImage)comp.GetChild("imgAni");
+            m_holder = (GGraph)comp.GetChild("holder");
+            m_holder1 = (GGraph)comp.GetChild("holder1");
         }
         public void Dispose(bool disposeTarget = false)
         {
@@ -70,6 +74,8 @@ namespace UI.Main
             m_txtMineScore = null;
             m_txtNpcScore = null;
             m_imgAni = null;
+            m_holder = null;
+            m_holder1 = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

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

@@ -22,13 +22,17 @@ namespace GFGGame
         private NTexture _nTexture;
         private bool _stopFight = false;
 
-        // private GameObject _gameObject0;
-        // private GameObject _gameObject1;
-        // private GameObject _gameObject2;
+        private GameObject _gameObject0;
+        private GameObject _gameObject1;
+        private GameObject _gameObject2;
+        private GameObject _gameObject3;
+        private GameObject _gameObject4;
 
-        // private GoWrapper _wrapper0;
-        // private GoWrapper _wrapper1;
-        // private GoWrapper _wrapper2;
+        private GoWrapper _wrapper0;
+        private GoWrapper _wrapper1;
+        private GoWrapper _wrapper2;
+        private GoWrapper _wrapper3;
+        private GoWrapper _wrapper4;
 
 
         public override void Dispose()
@@ -38,9 +42,11 @@ namespace GFGGame
                 GameObject.Destroy(_sceneObject);
                 _sceneObject = null;
             }
-            // SceneController.DestroyObjectFromView(_gameObject0, _wrapper0);
-            // SceneController.DestroyObjectFromView(_gameObject1, _wrapper1);
-            // SceneController.DestroyObjectFromView(_gameObject2, _wrapper2);
+            SceneController.DestroyObjectFromView(_gameObject0, _wrapper0);
+            SceneController.DestroyObjectFromView(_gameObject1, _wrapper1);
+            SceneController.DestroyObjectFromView(_gameObject2, _wrapper2);
+            SceneController.DestroyObjectFromView(_gameObject3, _wrapper3);
+            SceneController.DestroyObjectFromView(_gameObject4, _wrapper4);
 
             if (_ui != null)
             {
@@ -66,7 +72,20 @@ namespace GFGGame
             _ui.m_loaBg.url = ResPathUtil.GetFightBgImgPath("fightBg");
             _ui.m_LoaMask.url = ResPathUtil.GetFightBgImgPath("fightBg");
 
-
+            AddEffect();
+        }
+        private void AddEffect()
+        {
+            string resPath = ResPathUtil.GetViewEffectPath("ui_zhandou", "ui_zd_jdt_df_1");
+            SceneController.AddObjectToView(null, null, _ui.m_proScore.m_comFirstScore.m_holder, resPath, out _gameObject0, out _wrapper0);
+            string resPath1 = ResPathUtil.GetViewEffectPath("ui_zhandou", "ui_zd_jdt_df_2");
+            SceneController.AddObjectToView(null, null, _ui.m_proScore.m_comSecondScore.m_holder, resPath1, out _gameObject1, out _wrapper1);
+            string resPath2 = ResPathUtil.GetViewEffectPath("ui_zhandou", "ui_zd_jdt_df_3");
+            SceneController.AddObjectToView(null, null, _ui.m_proScore.m_comThirdScore.m_holder, resPath2, out _gameObject2, out _wrapper2);
+            string resPath3 = ResPathUtil.GetViewEffectPath("ui_zhandou", "ui_zd_jdt");
+            SceneController.AddObjectToView(null, null, _ui.m_proScore.m_holder, resPath3, out _gameObject3, out _wrapper3);
+            string resPath4 = ResPathUtil.GetViewEffectPath("ui_zhandou", "ui_zd_jdt_cz");
+            SceneController.AddObjectToView(null, null, _ui.m_proScore.m_holder1, resPath4, out _gameObject4, out _wrapper4);
         }
         protected override void AddEventListener()
         {
@@ -96,6 +115,9 @@ namespace GFGGame
             _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;
+            _gameObject0.SetActive(false);
+            _gameObject1.SetActive(false);
+            _gameObject2.SetActive(false);
             _ui.m_proScore.m_txtCount.text = "总分 0";
 
             _stopFight = false;
@@ -178,6 +200,9 @@ namespace GFGGame
                     _ui.m_proScore.m_comFirstScore.m_c1.selectedIndex = star > 0 ? 1 : 0;
                     _ui.m_proScore.m_comSecondScore.m_c1.selectedIndex = star > 1 ? 1 : 0;
                     _ui.m_proScore.m_comThirdScore.m_c1.selectedIndex = star > 2 ? 1 : 0;
+                    _gameObject0.SetActive(star > 0 ? true : false);
+                    _gameObject1.SetActive(star > 1 ? true : false);
+                    _gameObject2.SetActive(star > 2 ? true : false);
                     CircleResuleEnd();
                 });
         }
@@ -284,6 +309,9 @@ namespace GFGGame
             _ui.m_proScore.m_comFirstScore.m_c1.selectedIndex = 0;
             _ui.m_proScore.m_comSecondScore.m_c1.selectedIndex = 0;
             _ui.m_proScore.m_comThirdScore.m_c1.selectedIndex = 0;
+            _gameObject0.SetActive(false);
+            _gameObject1.SetActive(false);
+            _gameObject2.SetActive(false);
         }
 
 

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

@@ -166,8 +166,11 @@ namespace GFGGame
             SceneController.AddObjectToView(_gameObject16, null, _ui.m_holderPartScoreNpc, resPath9, out _gameObject16, out GoWrapper _wrapper16);
             SceneController.AddObjectToView(_gameObject17, null, _ui.m_holderAddScore, resPath9, out _gameObject17, out GoWrapper _wrapper17);
             SceneController.AddObjectToView(_gameObject18, null, _ui.m_holderAddScoreNpc, resPath9, out _gameObject18, out GoWrapper _wrapper18);
+
             string resPath10 = ResPathUtil.GetViewEffectPath("ui_zhandou", "ui_zd_jdt_cz");
-            // SceneController.AddObjectToView(_gameObject19, null, _ui.m_proScore.m_comBar.m_holder1, resPath10, out _gameObject19, out GoWrapper _wrapper19);
+            SceneController.AddObjectToView(_gameObject19, null, _ui.m_proScore.m_holder1, resPath10, out _gameObject19, out GoWrapper _wrapper19);
+            string resPath4 = ResPathUtil.GetViewEffectPath("ui_zhandou", "ui_zd_jdt");
+            SceneController.AddObjectToView(_gameObject6, null, _ui.m_proScore.m_holder, resPath4, out _gameObject6, out GoWrapper _wrapper6);
 
             string resPath3 = ResPathUtil.GetViewEffectPath("ui_zhandou", "ui_zd_jn_an");
             for (int i = 0; i < _skillCount; i++)
@@ -180,8 +183,7 @@ namespace GFGGame
                 _wrappers.Add(_wrapper);
             }
 
-            string resPath4 = ResPathUtil.GetViewEffectPath("ui_zhandou", "ui_zd_jdt");
-            // SceneController.AddObjectToView(_gameObject6, null, _ui.m_proScore.m_comBar.m_holder, resPath4, out _gameObject6, out GoWrapper _wrapper6);
+
 
             _ui.m_ComShieldMine.m_holder.visible = false;
             _ui.m_ComShieldMine.m_holder1.visible = false;

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