Browse Source

卡牌动画

zhaoyang 2 years ago
parent
commit
e6b1a67c55

+ 5 - 2
FGUIProject/assets/Main/StorySkillUI.xml

@@ -1,10 +1,13 @@
 <?xml version="1.0" encoding="utf-8"?>
 <component size="1080,1920">
   <displayList>
-    <graph id="n4_py00" name="n4" xy="0,0" size="1080,1920" alpha="0.2" type="rect" lineSize="0" fillColor="#ff000000">
+    <graph id="n4_py00" name="n4" xy="0,0" size="1080,1920" alpha="0.4" type="rect" lineSize="0" fillColor="#ff000000">
       <relation target="" sidePair="width-width,height-height"/>
     </graph>
-    <component id="n7_psph" name="comSkillShow" src="psphiy" fileName="ComSkillShow.xml" xy="540,960" pivot="0.5,0.5" anchor="true"/>
+    <image id="n8_idkd" name="n8" src="qkjsk9" fileName="imagesNew/back_card_zhzhao.png" xy="0,0">
+      <relation target="" sidePair="width-width,height-height,center-center,middle-middle"/>
+    </image>
+    <component id="n7_psph" name="comSkillShow" src="psphiy" fileName="components/ComSkillShow.xml" xy="540,960" pivot="0.5,0.5" anchor="true"/>
   </displayList>
   <transition name="t1">
     <item time="0" type="Scale" target="n7_psph" tween="true" startValue="1,1" endValue="0,0" duration="12" ease="Linear"/>

+ 0 - 2
FGUIProject/assets/Main/components/ComSkillCard.xml

@@ -1,8 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <component size="524,897">
   <displayList>
-    <image id="n4_qkjs" name="n4" src="qkjsjv" fileName="imagesNew/dikuang_card_light2.png" xy="-278,-129"/>
-    <image id="n3_qkjs" name="n3" src="qkjskb" fileName="imagesNew/dikuang_card.png" xy="-11,1"/>
     <component id="n0_py00" name="comCard" src="o9gho0" fileName="components/ComSkillCardMask.xml" xy="19,15"/>
     <image id="n2_qkjs" name="n2" src="qkjskc" fileName="imagesNew/dikuang_card_light1.png" xy="0,-2"/>
   </displayList>

+ 0 - 1
FGUIProject/assets/Main/components/ComSkillName.xml

@@ -2,7 +2,6 @@
 <component size="548,106" overflow="hidden">
   <displayList>
     <image id="n1_py00" name="n1" src="qkjsky" fileName="imagesNew/skill_card_light1.png" xy="0,31"/>
-    <text id="n2_py00" name="txtName" xy="27,13" size="454,79" font="ui://eg2y0ldpa0cftks" fontSize="60" color="#fefef6" align="center" ubb="true" autoSize="none" text="月中天"/>
     <image id="n3_qkjs" name="n3" src="qkjsky" fileName="imagesNew/skill_card_light1.png" xy="406,31" flip="hz"/>
   </displayList>
 </component>

+ 30 - 14
FGUIProject/assets/Main/components/ComSkillShow.xml

@@ -1,21 +1,37 @@
 <?xml version="1.0" encoding="utf-8"?>
-<component size="524,897">
+<component size="546,897">
   <displayList>
-    <component id="n0_py00" name="comSkillCard" src="py009o" fileName="components/ComSkillCard.xml" xy="0,0" pivot="0.5,0.5"/>
-    <component id="n1_py00" name="ComSkillName" src="sx2v9p" fileName="components/ComSkillName.xml" xy="-12,-106" size="548,106"/>
-    <component id="n6_om9f" name="ComSkillScore" src="om9f9w" fileName="components/ComSkillScore.xml" xy="322,34" pivot="0.5,0.5"/>
+    <graph id="n15_idkd" name="holderBottom" xy="268,443" size="10,10" group="n14_idkd" type="rect"/>
+    <image id="n13_idkd" name="n13" src="qkjskb" fileName="imagesNew/dikuang_card.png" xy="802,1" group="n14_idkd"/>
+    <component id="n0_py00" name="comSkillCard" src="py009o" fileName="components/ComSkillCard.xml" xy="-802,0" pivot="0.5,0.5" group="n14_idkd"/>
+    <component id="n6_om9f" name="ComSkillScore" src="om9f9w" fileName="components/ComSkillScore.xml" xy="322,34" pivot="0.5,0.5" group="n14_idkd" visible="false"/>
+    <text id="n17_idkd" name="txtName" xy="46,-95" size="454,79" group="n14_idkd" visible="false" font="ui://eg2y0ldpa0cftks" fontSize="60" color="#fefef6" align="center" ubb="true" autoSize="none" text="月中天"/>
+    <graph id="n16_idkd" name="holderTop" xy="275,417" size="10,10" group="n14_idkd" type="rect"/>
+    <group id="n14_idkd" name="n14" xy="-802,-95" size="2150,992"/>
   </displayList>
   <transition name="t0">
-    <item time="0" type="Alpha" target="n0_py00" tween="true" startValue="0.3" endValue="1" duration="4" ease="Linear"/>
-    <item time="0" type="Scale" target="n0_py00" tween="true" startValue="0,0" endValue="1.4,1.4" duration="5" ease="Linear"/>
-    <item time="0" type="Scale" target="n6_om9f" value="1.4,1.4"/>
-    <item time="0" type="Skew" target="n0_py00" tween="true" startValue="0,120" endValue="0,360" duration="5" ease="Linear"/>
-    <item time="0" type="Visible" target="n1_py00" value="false"/>
+    <item time="0" type="Alpha" target="n0_py00" tween="true" startValue="0" endValue="1" duration="18" ease="Linear"/>
+    <item time="0" type="Alpha" target="n13_idkd" tween="true" startValue="0" endValue="1" duration="18" ease="Linear"/>
+    <item time="0" type="Visible" target="n15_idkd" value="true"/>
+    <item time="0" type="Visible" target="n16_idkd" value="true"/>
+    <item time="0" type="Visible" target="n17_idkd" value="false"/>
     <item time="0" type="Visible" target="n6_om9f" value="false"/>
-    <item time="5" type="Scale" target="n0_py00" tween="true" startValue="1.4,1.4" endValue="1.4,1.4" duration="3" ease="Quad.In"/>
-    <item time="8" type="Scale" target="n0_py00" tween="true" startValue="1.4,1.4" endValue="1,1" duration="3" ease="Linear"/>
-    <item time="12" type="Visible" target="n1_py00" value="true"/>
-    <item time="16" type="Scale" target="n6_om9f" tween="true" startValue="1.4,1.4" endValue="1,1" duration="4" ease="Quad.In"/>
-    <item time="16" type="Visible" target="n6_om9f" value="true"/>
+    <item time="0" type="XY" target="n0_py00" tween="true" startValue="-802,0" endValue="11,0" duration="18" ease="Expo.Out"/>
+    <item time="0" type="XY" target="n13_idkd" tween="true" startValue="802,1" endValue="0,1" duration="18" ease="Expo.Out"/>
+    <item time="18" type="Scale" target="n6_om9f" tween="true" startValue="0,0" endValue="1.4,1.4" duration="6" ease="Linear"/>
+    <item time="18" type="Visible" target="n17_idkd" value="true"/>
+    <item time="18" type="Visible" target="n6_om9f" value="true"/>
+    <item time="24" type="Scale" target="n6_om9f" tween="true" startValue="1.4,1.4" endValue="1,1" duration="6" ease="Linear"/>
+    <item time="60" type="Visible" target="n17_idkd" value="true"/>
+  </transition>
+  <transition name="t1">
+    <item time="0" type="Alpha" target="n0_py00" tween="true" startValue="1" endValue="0" duration="18" ease="Linear"/>
+    <item time="0" type="Alpha" target="n13_idkd" tween="true" startValue="1" endValue="0" duration="18" ease="Linear"/>
+    <item time="0" type="Visible" target="n15_idkd" value="false"/>
+    <item time="0" type="Visible" target="n16_idkd" value="false"/>
+    <item time="0" type="Visible" target="n17_idkd" value="false"/>
+    <item time="0" type="Visible" target="n6_om9f" value="false"/>
+    <item time="0" type="XY" target="n0_py00" tween="true" startValue="11,0" endValue="-802,0" duration="18" ease="Expo.In"/>
+    <item time="0" type="XY" target="n13_idkd" tween="true" startValue="0,1" endValue="802,1" duration="18" ease="Expo.In"/>
   </transition>
 </component>

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

@@ -486,7 +486,7 @@
     <image id="qkjsk6" name="font_zdsz_9.png" path="/FontNew/"/>
     <image id="qkjsk7" name="result.png" path="/imagesNew/"/>
     <image id="qkjsk8" name="score.png" path="/imagesNew/"/>
-    <image id="qkjsk9" name="back_card_zhzhao.png" path="/imagesNew/"/>
+    <image id="qkjsk9" name="back_card_zhzhao.png" path="/imagesNew/" scale="9grid" scale9grid="270,480,540,960"/>
     <image id="qkjska" name="btn_card_speed2.png" path="/imagesNew/"/>
     <image id="qkjskb" name="dikuang_card.png" path="/imagesNew/"/>
     <image id="qkjskc" name="dikuang_card_light1.png" path="/imagesNew/"/>

+ 0 - 71
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Main/UI_ComSkillName.cs

@@ -1,71 +0,0 @@
-/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
-
-using FairyGUI;
-
-namespace UI.Main
-{
-    public partial class UI_ComSkillName
-    {
-        public GComponent target;
-        public GTextField m_txtName;
-        public const string URL = "ui://mfvz4q8ksx2v9p";
-        public const string PACKAGE_NAME = "Main";
-        public const string RES_NAME = "ComSkillName";
-        private static UI_ComSkillName _proxy;
-
-        public static UI_ComSkillName Create(GObject gObject = null)
-        {
-            var ui = new UI_ComSkillName();
-            if(gObject == null)
-            	ui.target =  (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
-            else
-            	ui.target =  (GComponent)gObject;
-            ui.Init(ui.target);
-            return ui;
-        }
-
-        public static UI_ComSkillName Proxy(GObject gObject = null)
-        {
-            if(_proxy == null)
-            {
-                _proxy = new UI_ComSkillName();
-            }
-            var ui = _proxy;
-            if(gObject == null)
-            	ui.target =  (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
-            else
-            	ui.target =  (GComponent)gObject;
-            ui.Init(ui.target);
-            return ui;
-        }
-
-        public static void ProxyEnd()
-        {
-            if (_proxy != null)
-            {
-                _proxy.Dispose();
-            }
-        }
-
-        public static void ClearProxy()
-        {
-            ProxyEnd();
-            _proxy = null;
-        }
-
-        private void Init(GComponent comp)
-        {
-            m_txtName = (GTextField)comp.GetChild("txtName");
-        }
-        public void Dispose(bool disposeTarget = false)
-        {
-            m_txtName = null;
-            if(disposeTarget && target != null)
-            {
-                target.RemoveFromParent();
-                target.Dispose();
-            }
-            target = null;
-        }
-    }
-}

+ 0 - 11
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Main/UI_ComSkillName.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 12e2337625027434ab6b85d99940b96c
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 12 - 4
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Main/UI_ComSkillShow.cs

@@ -7,10 +7,13 @@ namespace UI.Main
     public partial class UI_ComSkillShow
     {
         public GComponent target;
+        public GGraph m_holderBottom;
         public UI_ComSkillCard m_comSkillCard;
-        public UI_ComSkillName m_ComSkillName;
         public UI_ComSkillScore m_ComSkillScore;
+        public GTextField m_txtName;
+        public GGraph m_holderTop;
         public Transition m_t0;
+        public Transition m_t1;
         public const string URL = "ui://mfvz4q8kpsphiy";
         public const string PACKAGE_NAME = "Main";
         public const string RES_NAME = "ComSkillShow";
@@ -58,20 +61,25 @@ namespace UI.Main
 
         private void Init(GComponent comp)
         {
+            m_holderBottom = (GGraph)comp.GetChild("holderBottom");
             m_comSkillCard = (UI_ComSkillCard)UI_ComSkillCard.Create(comp.GetChild("comSkillCard"));
-            m_ComSkillName = (UI_ComSkillName)UI_ComSkillName.Create(comp.GetChild("ComSkillName"));
             m_ComSkillScore = (UI_ComSkillScore)UI_ComSkillScore.Create(comp.GetChild("ComSkillScore"));
+            m_txtName = (GTextField)comp.GetChild("txtName");
+            m_holderTop = (GGraph)comp.GetChild("holderTop");
             m_t0 = comp.GetTransition("t0");
+            m_t1 = comp.GetTransition("t1");
         }
         public void Dispose(bool disposeTarget = false)
         {
+            m_holderBottom = null;
             m_comSkillCard.Dispose();
             m_comSkillCard = null;
-            m_ComSkillName.Dispose();
-            m_ComSkillName = null;
             m_ComSkillScore.Dispose();
             m_ComSkillScore = null;
+            m_txtName = null;
+            m_holderTop = null;
             m_t0 = null;
+            m_t1 = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

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

@@ -1,7 +1,9 @@
 
 using System;
 using System.Collections.Generic;
+using FairyGUI;
 using UI.Main;
+using UnityEngine;
 
 namespace GFGGame
 {
@@ -9,9 +11,15 @@ namespace GFGGame
     {
         private UI_StorySkillUI _ui;
         private Dictionary<int, int> skillScoreDic;
+        private GameObject _gameObject0;
+        private GameObject _gameObject1;
+        private GoWrapper _wrapper0;
+        private GoWrapper _wrapper1;
 
         public override void Dispose()
         {
+            SceneController.DestroyObjectFromView(_gameObject0, _wrapper0);
+            SceneController.DestroyObjectFromView(_gameObject1, _wrapper1);
             if (_ui != null)
             {
                 _ui.Dispose();
@@ -26,6 +34,13 @@ namespace GFGGame
             viewCom = _ui.target;
             isfullScreen = true;
             // this.modal = false;
+            string resPath = ResPathUtil.GetViewEffectPath("ui_fight_new", "CFKP_TX_down");
+            SceneController.AddObjectToView(null, null, _ui.m_comSkillShow.m_holderBottom, resPath, out _gameObject0, out _wrapper0);
+            string resPath1 = ResPathUtil.GetViewEffectPath("ui_fight_new", "CFKP_TX_up");
+            SceneController.AddObjectToView(null, null, _ui.m_comSkillShow.m_holderTop, resPath1, out _gameObject1, out _wrapper1);
+            _ui.m_comSkillShow.m_t0.ignoreEngineTimeScale = false;
+            _ui.m_comSkillShow.m_t1.ignoreEngineTimeScale = false;
+            _ui.m_t1.ignoreEngineTimeScale = false;
 
         }
         protected override void OnShown()
@@ -45,8 +60,8 @@ namespace GFGGame
                     break;
                 }
                 PassivitySkillCfg skillCfg = PassivitySkillCfgArray.Instance.GetCfg(skillId);
-                _ui.m_comSkillShow.m_ComSkillName.target.GetChild("txtName").asTextField.text = skillCfg.name;
-                _ui.m_comSkillShow.m_ComSkillScore.target.GetChild("txtCount").asTextField.text = skillScoreDic[skillId].ToString();
+                _ui.m_comSkillShow.m_txtName.text = skillCfg.name;
+                _ui.m_comSkillShow.m_ComSkillScore.m_txtCount.text = skillScoreDic[skillId].ToString();
 
                 string res = skillCfg.res;
                 if (string.IsNullOrEmpty(skillCfg.res))
@@ -55,15 +70,21 @@ namespace GFGGame
                     ET.Log.Error("技能" + skillCfg.skillId + "  未配资源");
                 }
                 _ui.m_comSkillShow.m_comSkillCard.m_comCard.m_loaCard.url = ResPathUtil.GetCardPath(res);
+                _ui.m_comSkillShow.m_t0.timeScale = FightDataManager.Instance.fightSpeed;
                 _ui.m_comSkillShow.m_t0.Play(() =>
                 {
                     if (skillScoreDic[skillId] > 0)
                     {
-                        skillScoreDic.Remove(skillId);
-                        UpdateView();
+                        _ui.m_comSkillShow.m_t1.timeScale = FightDataManager.Instance.fightSpeed;
+                        _ui.m_comSkillShow.m_t1.Play(() =>
+                        {
+                            skillScoreDic.Remove(skillId);
+                            UpdateView();
+                        });
                     }
                     else
                     {
+                        _ui.m_t1.timeScale = FightDataManager.Instance.fightSpeed;
                         _ui.m_t1.Play(() =>
                         {
                             skillScoreDic.Remove(skillId);

BIN
GameClient/Assets/ResIn/UI/Main/Main_atlas0!a.png


BIN
GameClient/Assets/ResIn/UI/Main/Main_atlas0.png


BIN
GameClient/Assets/ResIn/UI/Main/Main_atlas0_1!a.png


BIN
GameClient/Assets/ResIn/UI/Main/Main_atlas0_1.png


BIN
GameClient/Assets/ResIn/UI/Main/Main_atlas0_4!a.png


BIN
GameClient/Assets/ResIn/UI/Main/Main_atlas0_4.png


BIN
GameClient/Assets/ResIn/UI/Main/Main_atlas0_5!a.png


BIN
GameClient/Assets/ResIn/UI/Main/Main_atlas0_5.png


BIN
GameClient/Assets/ResIn/UI/Main/Main_atlas0_7!a.png


BIN
GameClient/Assets/ResIn/UI/Main/Main_atlas0_7.png


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