浏览代码

单人战斗

zhaoyang 2 年之前
父节点
当前提交
89f9000f9b

+ 13 - 13
FGUIProject/assets/Main/StoryFightSingleScoreUI.xml

@@ -15,16 +15,16 @@
       <ProgressBar max="100"/>
     </component>
     <component id="n42_wono" name="comScoreStage" src="wonoh2" fileName="components/ComSingleScoreStage.xml" xy="1022,108" pivot="0.5,0.5" anchor="true"/>
-    <loader id="n40_wono" name="loaGlass" xy="539,959" pivot="0.5,0.5" anchor="true" size="124,208" scale="0,0" url="ui://mfvz4q8kwonogt" autoSize="true"/>
-    <component id="n4_n0js" name="comClickCircle" src="n0js9b" fileName="components/comClickCircle.xml" xy="540,960" pivot="0.5,0.5" anchor="true" scale="0,0"/>
-    <graph id="n30_uo1t" name="grh_0" xy="318,349" pivot="0.5,0.5" size="25,25" aspect="true"/>
-    <graph id="n23_uo1t" name="grh_1" xy="824,739" pivot="0.5,0.5" size="25,25" aspect="true"/>
-    <graph id="n24_uo1t" name="grh_2" xy="817,1303" pivot="0.5,0.5" size="25,25" aspect="true"/>
-    <graph id="n25_uo1t" name="grh_3" xy="208,542" pivot="0.5,0.5" size="25,25" aspect="true"/>
-    <graph id="n26_uo1t" name="grh_4" xy="286,1348" pivot="0.5,0.5" size="25,25" aspect="true"/>
-    <graph id="n27_uo1t" name="grh_5" xy="238,1579" pivot="0.5,0.5" size="25,25" aspect="true"/>
-    <graph id="n28_uo1t" name="grh_6" xy="200,865" pivot="0.5,0.5" size="25,25" aspect="true"/>
-    <graph id="n29_uo1t" name="grh_7" xy="782,389" pivot="0.5,0.5" size="25,25" aspect="true"/>
+    <loader id="n40_wono" name="loaGlass" xy="402,823" pivot="0.5,0.5" size="274,274" scale="0,0" url="ui://mfvz4q8kwonogt" align="center" vAlign="middle"/>
+    <component id="n4_n0js" name="comClickCircle" src="n0js9b" fileName="components/comClickCircle.xml" xy="403,823" pivot="0.5,0.5" scale="0,0"/>
+    <graph id="n30_uo1t" name="grh_0" xy="258,270" pivot="0.5,0.5" size="25,25" aspect="true"/>
+    <graph id="n23_uo1t" name="grh_1" xy="764,660" pivot="0.5,0.5" size="25,25" aspect="true"/>
+    <graph id="n24_uo1t" name="grh_2" xy="757,1224" pivot="0.5,0.5" size="25,25" aspect="true"/>
+    <graph id="n25_uo1t" name="grh_3" xy="148,463" pivot="0.5,0.5" size="25,25" aspect="true"/>
+    <graph id="n26_uo1t" name="grh_4" xy="226,1269" pivot="0.5,0.5" size="25,25" aspect="true"/>
+    <graph id="n27_uo1t" name="grh_5" xy="178,1500" pivot="0.5,0.5" size="25,25" aspect="true"/>
+    <graph id="n28_uo1t" name="grh_6" xy="140,786" pivot="0.5,0.5" size="25,25" aspect="true"/>
+    <graph id="n29_uo1t" name="grh_7" xy="722,310" pivot="0.5,0.5" size="25,25" aspect="true"/>
     <component id="n36_jj0m" name="btnSpeedUp" src="jj0mdl" fileName="componentsDialog/ButtonSpeedUp1.xml" xy="915,1627">
       <relation target="" sidePair="right-right,bottom-bottom"/>
       <Button title="x1"/>
@@ -41,11 +41,11 @@
     <item time="0" type="Rotation" target="n40_wono" value="0"/>
     <item time="0" type="Scale" target="n40_wono" value="1,1"/>
     <item time="0" type="Scale" target="n4_n0js" tween="true" startValue="0,0" endValue="1,1" duration="18" ease="Elastic.Out"/>
-    <item time="19" type="Alpha" target="n40_wono" tween="true" startValue="0" endValue="1" duration="11" ease="Linear"/>
+    <item time="18" type="Alpha" target="n40_wono" tween="true" startValue="0" endValue="1" duration="12" ease="Linear"/>
     <item time="48" type="Rotation" target="n40_wono" tween="true" startValue="0" endValue="360" duration="12" ease="Linear"/>
     <item time="48" type="Scale" target="n40_wono" tween="true" startValue="1,1" endValue="0,0" duration="12" ease="Linear"/>
-    <item time="48" type="Scale" target="n4_n0js" value="0,0"/>
-    <item time="48" type="XY" target="n40_wono" label="start" tween="true" startValue="539.5,959.5" endValue="539.5,108" duration="12" label2="end" ease="Linear"/>
+    <item time="48" type="XY" target="n40_wono" label="start" tween="true" startValue="402,822" endValue="539.5,108" duration="12" label2="end" ease="Linear"/>
+    <item time="49" type="Scale" target="n4_n0js" value="0,0"/>
   </transition>
   <transition name="t2">
     <item time="0" type="Alpha" target="n47_wono" tween="true" startValue="0" endValue="0.6" duration="12" ease="Linear"/>

+ 2 - 2
FGUIProject/assets/Main/components/ComRoleResult.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
-<component size="730,1649">
-  <controller name="c1" pages="0,,1,,2,,3," selected="0"/>
+<component size="730,1649" opaque="false">
+  <controller name="c1" pages="0,,1,,2,,3," selected="3"/>
   <displayList>
     <component id="n14_wono" name="comRole" src="wonogm" fileName="components/ComRole.xml" xy="72,90"/>
     <image id="n11_wono" name="n11" src="wonog6" fileName="imagesFight/jz_yjd_k.png" xy="39,60"/>

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

@@ -63,6 +63,8 @@ namespace GFGGame
             _ui.m_btnBack.onClick.Add(OnBtnBackClick);
             _ui.m_btnSpeedUp.onClick.Add(OnBtnSpeedUp);
 
+            _ui.m_comClickCircle.target.onClick.Add(OnComClickCircle);
+
             _ui.m_loaBg.url = ResPathUtil.GetFightBgImgPath("zd_bj_bja_2");
 
         }
@@ -74,16 +76,15 @@ namespace GFGGame
         protected override void OnShown()
         {
             base.OnShown();
+            ScoreSystemData.Instance.SetEquipDicWithType();
 
+            _ui.m_comClickCircle.target.touchable = false;
             _ui.m_loaRole.texture = EquipDataCache.cacher.nTexture;
             _ui.m_loaRole.SetSize(_ui.m_loaRole.width, _ui.m_loaRole.texture.height * _ui.m_loaRole.width / _ui.m_loaRole.texture.width);
 
             _ui.m_btnSpeedUp.visible = EquipDataCache.cacher.autoPlay;
             _ui.m_btnSpeedUp.title = "x" + EquipDataCache.cacher.fightSpeed;
 
-
-            ScoreSystemData.Instance.SetEquipDicWithType();
-
             StoryLevelCfg levelCfg = StoryLevelCfgArray.Instance.GetCfg(InstanceZonesDataManager.currentLevelCfgId);
             StoryFightCfg fightCfg = StoryFightCfgArray.Instance.GetCfg(levelCfg.fightID);
             _ui.m_proScore.target.max = fightCfg.score3;
@@ -106,7 +107,7 @@ namespace GFGGame
             {
                 SkillScore(null);
             });//评分结束
-            Timers.inst.AddUpdate(CheckGuide);
+            // Timers.inst.AddUpdate(CheckGuide);
         }
 
         private void SkillScore(object param)
@@ -144,23 +145,20 @@ namespace GFGGame
             _ui.m_comClickCircle.target.SetXY(x, y);
             _ui.m_loaGlass.SetXY(x, y);
             _ui.m_loaGlass.url = string.Format("ui://Main/zd_bl_{0}", UnityEngine.Random.Range(0, 3));
+            _ui.m_t1.ignoreEngineTimeScale = false;
+            _ui.m_t1.timeScale = EquipDataCache.cacher.fightSpeed;
+            _ui.m_t1.SetValue("start", _ui.m_loaGlass.x, _ui.m_loaGlass.y);
+            _ui.m_t1.SetValue("end", _ui.m_proScore.m_comBar.m_imgAni.LocalToGlobal(Vector2.zero).x - _ui.m_loaGlass.width / 2, _ui.m_proScore.target.y - _ui.m_loaGlass.height / 2);
 
             if (_index == 0 && GuideDataManager.IsGuideFinish(ConstGuideId.SINGLE_FIGHT) <= 0)
             {
-                _ui.m_comClickCircle.target.touchable = false;
-
-                // GTween.To(100, _prefectScale, _playTime / 2).SetTarget(_gameObject7).OnUpdate((GTweener t) =>
-                // {
-                //     _gameObject7.transform.localScale = new Vector3(t.value.x, t.value.x, t.value.x);
-                // });
+                _ui.m_t1.Play(1, 0, 0, 2, () =>
+                {
+                    Timers.inst.AddUpdate(UpdateToCheckGuide);
+                });
             }
             else
             {
-
-                _ui.m_t1.ignoreEngineTimeScale = false;
-                _ui.m_t1.timeScale = EquipDataCache.cacher.fightSpeed;
-                _ui.m_t1.SetValue("start", _ui.m_loaGlass.x, _ui.m_loaGlass.y);
-                _ui.m_t1.SetValue("end", _ui.m_proScore.m_comBar.m_imgAni.LocalToGlobal(Vector2.zero).x, _ui.m_proScore.target.y);
                 _ui.m_t1.Play(UpdateProgress);
             }
 
@@ -228,7 +226,11 @@ namespace GFGGame
         }
 
 
-
+        private void OnComClickCircle()
+        {
+            _ui.m_comClickCircle.target.touchable = false;
+            _ui.m_t1.Play(1, 0, 2f, 2.5f, UpdateProgress);
+        }
         private void OnBtnSpeedUp()
         {
             EquipDataCache.cacher.fightSpeed = EquipDataCache.cacher.fightSpeed == 1 ? EquipDataCache.cacher.maxFightSpeed : 1;
@@ -285,37 +287,38 @@ namespace GFGGame
             }
 
             Reset();
-            Timers.inst.Remove(CheckGuide);
+            Timers.inst.Remove(UpdateToCheckGuide);
         }
 
 
 
-        private void CheckGuide(object param)
-        {
-            if (GuideDataManager.IsGuideFinish(ConstGuideId.SINGLE_FIGHT) <= 0)
-            {
-                UpdateToCheckGuide(null);
-            }
-            else
-            {
-                Timers.inst.Remove(CheckGuide);
-            }
-        }
+        // private void CheckGuide(object param)
+        // {
+        //     if (GuideDataManager.IsGuideFinish(ConstGuideId.SINGLE_FIGHT) <= 0)
+        //     {
+        //         UpdateToCheckGuide(null);
+        //     }
+        //     else
+        //     {
+        //         Timers.inst.Remove(CheckGuide);
+        //     }
+        // }
 
         protected override void UpdateToCheckGuide(object param)
         {
 
             if (!ViewManager.CheckIsTopView(this.viewCom)) return;
 
-            float scaleX = 0;// _gameObject7.transform.localScale.x;
-            if (scaleX == _prefectScale)
+            // float scaleX = 0;// _gameObject7.transform.localScale.x;
+            // if (scaleX == _prefectScale)
+            // {
+            bool isGuide = GuideController.TryGuide(_ui.m_comClickCircle.target, ConstGuideId.SINGLE_FIGHT, 9, "服饰比较繁琐,适当的整理会更加分,点击为各部位修整吧。");
+            if (isGuide)
             {
-                bool isGuide = GuideController.TryGuide(_ui.m_comClickCircle.target, ConstGuideId.SINGLE_FIGHT, 9, "服饰比较繁琐,适当的整理会更加分,点击为各部位修整吧。");
-                if (isGuide)
-                {
-                    _ui.m_comClickCircle.target.touchable = true;
-                }
+                _ui.m_comClickCircle.target.touchable = true;
             }
+            // }
+            // GuideController.TryGuide(_ui.m_comClickCircle.target, ConstGuideId.SINGLE_FIGHT, 9, "服饰比较繁琐,适当的整理会更加分,点击为各部位修整吧。");
             GuideController.TryCompleteGuide(ConstGuideId.SINGLE_FIGHT, 9);
         }
     }

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

@@ -98,11 +98,10 @@ namespace GFGGame
             {
                 _ui.m_comExpBar.target.visible = true;
                 _ui.m_btnClose.enabled = false;
-                //过关
 
+                //过关
                 StoryFightCfg fightCfg = StoryFightCfgArray.Instance.GetCfg(_levelCfg.fightID);
                 _ui.m_comExpBar.m_txtLvlAdded.text = string.Format("经验值:+{0}", fightCfg.exp);
-                // Timers.inst.Add(0.5f, 1, this.AddExp);
             }
 
             if (_levelCfg.type == ConstInstanceZonesType.Field)
@@ -112,8 +111,7 @@ namespace GFGGame
             }
             _ui.m_t1.Play(AddExp);
 
-            UpdateToCheckGuide(null);
-            Timers.inst.AddUpdate(CheckGuide);
+
         }
 
         protected override void OnHide()
@@ -187,6 +185,8 @@ namespace GFGGame
             // _ui.m_expBar.m_pbExp..TweenValue(exp, 0.2f);
             _ui.m_btnClose.enabled = true;
 
+            UpdateToCheckGuide(null);
+            Timers.inst.AddUpdate(CheckGuide);
         }
         private void CheckGuide(object param)
         {

二进制
GameClient/Assets/ResIn/UI/Main/Main_fui.bytes