Procházet zdrojové kódy

降低小游戏2得分 增加操作错误动画

LiuQilin před 8 roky
rodič
revize
ca62249f58

+ 11 - 5
Assets/Script/Manage/ManaMiniGame.cs

@@ -882,7 +882,7 @@ public class ManaMiniGame : Regist
     }
 
 
-    public static void Operate(int index)
+    public static void Operate(int index, int slotIndex)
     {
         if (Panalty || !FadeList.Valid())
         {
@@ -894,7 +894,8 @@ public class ManaMiniGame : Regist
             return;
         }
 
-        if (index == IndexList[0])
+
+        if (slotIndex == IndexList[0])
         {
             int uiIndex = IndexMap(IndexList[0]);
 
@@ -909,11 +910,11 @@ public class ManaMiniGame : Regist
             IndexList.RemoveAt(0);
 
 
-            Flower flower = FlowerDic[index];
+            Flower flower = FlowerDic[slotIndex];
 
-            ManaReso.GetHudText("+45", Color.white, 90, flower.ChildDic["ScorePosTra"], ManaReso.Get("D_HudParent"), true);
+            ManaReso.GetHudText("+30", Color.white, 90, flower.ChildDic["ScorePosTra"], ManaReso.Get("D_HudParent"), true);
 
-            Score += 45;
+            Score += 30;
 
             flower.PlayParticle();
 
@@ -939,6 +940,11 @@ public class ManaMiniGame : Regist
         {
             Panalty = true;
             PanaltyTimer = PanaltyTime;
+            
+            //ManaReso.Get("D_FlowerBtn" + uiIndex).TweenForGra();
+            ManaReso.Get("D_FlowerIcon" + index).TweenForGra();
+
+            ManaReso.Get("D_FlowerBtn" + index).Shake(0.5f, 3, new Vector3(20f, 0, 0), Curve.EaseOutQuad);
 
             ManaAudio.PlayClip(Clip.ErrorClip);
         }

+ 103 - 6
Assets/Script/Manage/ManaUI.cs

@@ -802,12 +802,109 @@ public class ManaUI : Regist
 
         #region D_FlowerBtn
 
-        ManaReso.AddButtonEvent("D_FlowerBtn1", () => { ManaMiniGame.Operate(1); });
-        ManaReso.AddButtonEvent("D_FlowerBtn2", () => { ManaMiniGame.Operate(2); });
-        ManaReso.AddButtonEvent("D_FlowerBtn3", () => { ManaMiniGame.Operate(4); });
-        ManaReso.AddButtonEvent("D_FlowerBtn4", () => { ManaMiniGame.Operate(5); });
-        ManaReso.AddButtonEvent("D_FlowerBtn5", () => { ManaMiniGame.Operate(7); });
-        ManaReso.AddButtonEvent("D_FlowerBtn6", () => { ManaMiniGame.Operate(8); });
+        //tweenRoot = ManaReso.Get("D_FlowerBtn1").CreateTweenGra(new Color(1, 1, 1), new Color(1, 0.5f, 0.5f), 0.25f, true, true, Curve.EaseOutQuad);
+
+        //var root0 = tweenRoot;
+        //tweenRoot.OnForwardFinish = () =>
+        //{
+        //    root0.StartBackward();
+        //};
+
+        //tweenRoot = ManaReso.Get("D_FlowerBtn2").CreateTweenGra(new Color(1, 1, 1), new Color(1, 0.5f, 0.5f), 0.25f, true, true, Curve.EaseOutQuad);
+
+        //var root1 = tweenRoot;
+        //tweenRoot.OnForwardFinish = () =>
+        //{
+        //    root1.StartBackward();
+        //};
+
+        //tweenRoot = ManaReso.Get("D_FlowerBtn3").CreateTweenGra(new Color(1, 1, 1), new Color(1, 0.5f, 0.5f), 0.25f, true, true, Curve.EaseOutQuad);
+
+        //var root2 = tweenRoot;
+        //tweenRoot.OnForwardFinish = () =>
+        //{
+        //    root2.StartBackward();
+        //};
+
+        //tweenRoot = ManaReso.Get("D_FlowerBtn4").CreateTweenGra(new Color(1, 1, 1), new Color(1, 0.5f, 0.5f), 0.25f, true, true, Curve.EaseOutQuad);
+
+        //var root3 = tweenRoot;
+        //tweenRoot.OnForwardFinish = () =>
+        //{
+        //    root3.StartBackward();
+        //};
+
+        //tweenRoot = ManaReso.Get("D_FlowerBtn5").CreateTweenGra(new Color(1, 1, 1), new Color(1, 0.5f, 0.5f), 0.25f, true, true, Curve.EaseOutQuad);
+
+        //var root4 = tweenRoot;
+        //tweenRoot.OnForwardFinish = () =>
+        //{
+        //    root4.StartBackward();
+        //};
+
+        //tweenRoot = ManaReso.Get("D_FlowerBtn6").CreateTweenGra(new Color(1, 1, 1), new Color(1, 0.5f, 0.5f), 0.25f, true, true, Curve.EaseOutQuad);
+
+        //var root6 = tweenRoot;
+        //tweenRoot.OnForwardFinish = () =>
+        //{
+        //    root6.StartBackward();
+        //};
+
+
+        tweenRoot = ManaReso.Get("D_FlowerIcon1").CreateTweenGra(new Color(1, 1, 1), new Color(1, 0.7f, 0.7f), 0.25f, true, true, Curve.EaseOutQuad);
+
+        var root0 = tweenRoot;
+        tweenRoot.OnForwardFinish = () =>
+        {
+            root0.StartBackward();
+        };
+
+        tweenRoot = ManaReso.Get("D_FlowerIcon2").CreateTweenGra(new Color(1, 1, 1), new Color(1, 0.7f, 0.7f), 0.25f, true, true, Curve.EaseOutQuad);
+
+        var root1 = tweenRoot;
+        tweenRoot.OnForwardFinish = () =>
+        {
+            root1.StartBackward();
+        };
+
+        tweenRoot = ManaReso.Get("D_FlowerIcon3").CreateTweenGra(new Color(1, 1, 1), new Color(1, 0.7f, 0.7f), 0.25f, true, true, Curve.EaseOutQuad);
+
+        var root2 = tweenRoot;
+        tweenRoot.OnForwardFinish = () =>
+        {
+            root2.StartBackward();
+        };
+
+        tweenRoot = ManaReso.Get("D_FlowerIcon4").CreateTweenGra(new Color(1, 1, 1), new Color(1, 0.7f, 0.7f), 0.25f, true, true, Curve.EaseOutQuad);
+
+        var root3 = tweenRoot;
+        tweenRoot.OnForwardFinish = () =>
+        {
+            root3.StartBackward();
+        };
+
+        tweenRoot = ManaReso.Get("D_FlowerIcon5").CreateTweenGra(new Color(1, 1, 1), new Color(1, 0.7f, 0.7f), 0.25f, true, true, Curve.EaseOutQuad);
+
+        var root4 = tweenRoot;
+        tweenRoot.OnForwardFinish = () =>
+        {
+            root4.StartBackward();
+        };
+
+        tweenRoot = ManaReso.Get("D_FlowerIcon6").CreateTweenGra(new Color(1, 1, 1), new Color(1, 0.7f, 0.7f), 0.25f, true, true, Curve.EaseOutQuad);
+
+        tweenRoot.OnForwardFinish = () =>
+        {
+            tweenRoot.StartBackward();
+        };
+
+
+        ManaReso.AddButtonEvent("D_FlowerBtn1", () => { ManaMiniGame.Operate(1,1); });
+        ManaReso.AddButtonEvent("D_FlowerBtn2", () => { ManaMiniGame.Operate(2,2); });
+        ManaReso.AddButtonEvent("D_FlowerBtn3", () => { ManaMiniGame.Operate(3,4); });
+        ManaReso.AddButtonEvent("D_FlowerBtn4", () => { ManaMiniGame.Operate(4,5); });
+        ManaReso.AddButtonEvent("D_FlowerBtn5", () => { ManaMiniGame.Operate(5,7); });
+        ManaReso.AddButtonEvent("D_FlowerBtn6", () => { ManaMiniGame.Operate(6,8); });
 
         #endregion
 

binární
ProjectSettings/GraphicsSettings.asset


binární
ProjectSettings/ProjectSettings.asset