浏览代码

Fix layout

jet 8 年之前
父节点
当前提交
e0347145f9

二进制
Assets/Resource/Logo.unity


二进制
Assets/Resource/Prefab/PrefabUI/GroupA.prefab


二进制
Assets/Resource/Prefab/PrefabUI/GroupB.prefab


+ 4 - 4
Assets/Resource/XML/PlayerConfig.xml

@@ -1,10 +1,10 @@
 <PlayerConfig>
-  <Version value="632" />
+  <Version value="652" />
 
   <ID value="Default" />
-  <TutorialA value="1" />
+////  <TutorialA value="0" />
   <TutorialB value="1" />
-  <TutorialC value="1" />
+////  <TutorialC value="0" />
   <TutorialIndexA value="1" />
   <TutorialIndexB value="1" />
   <TutorialIndexC value="1" />
@@ -49,7 +49,7 @@
     <Skill ID="Pack10" SkillType="Pack" ItemStatus="Lock" Level="0" />
     <Skill ID="Pack11" SkillType="Pack" ItemStatus="Lock" Level="0" />
     
-    <Skill ID="Ability1" SkillType="Ability" ItemStatus="Lock" Level="0" />
+    <Skill ID="Ability1" SkillType="Ability" ItemStatus="Upgrade" Level="18" />
     <Skill ID="Ability2" SkillType="Ability" ItemStatus="Lock" Level="0" />
     <Skill ID="Ability3" SkillType="Ability" ItemStatus="Lock" Level="0" />
     <Skill ID="Ability4" SkillType="Ability" ItemStatus="Lock" Level="0" />

+ 0 - 22
Assets/Script/Extension/ExtensionImage.cs

@@ -1,22 +0,0 @@
-using UnityEngine;
-using UnityEngine.UI;
-
-using System.Collections;
-
-public static class ExtensionImage
-{
-    public static void Resize(this Image image, float ratioX, float ratioY)
-    {
-        Vector2 newSize = image.sprite.rect.size;
-
-        newSize.x *= ratioX;
-        newSize.y *= ratioY;
-
-        image.rectTransform.sizeDelta = newSize;
-    }
-
-    public static void Resize(this Image image, Vector2 newSize)
-    {
-        image.rectTransform.sizeDelta = newSize;
-    }
-}

+ 143 - 0
Assets/Script/Extension/ExtensionResize.cs

@@ -0,0 +1,143 @@
+using UnityEngine;
+using UnityEngine.UI;
+
+using System.Collections;
+
+public static class ExtensionResize
+{
+    public static void Resize(this Image image, bool ratio, float x = -999999999, float y = -999999999)
+    {
+        Vector2 newSize;
+
+        SizeMap(ratio, image.sprite.rect.size, ref x, ref y);
+
+        if (ratio)
+        {
+            newSize = image.sprite.rect.size;
+
+            newSize.x *= x;
+            newSize.y *= y;
+        }
+        else
+        {
+            newSize = new Vector2(x, y);
+        }
+
+        image.rectTransform.sizeDelta = newSize;
+    }
+
+    public static void Resize(this Image image, bool ratio, Vector2 size)
+    {
+        Vector2 newSize;
+
+        if (ratio)
+        {
+            newSize = image.sprite.rect.size;
+
+            newSize.x *= size.x;
+            newSize.y *= size.y;
+        }
+        else
+        {
+            newSize = size;
+        }
+
+        image.rectTransform.sizeDelta = newSize;
+    }
+
+
+    public static void Resize(this RectTransform rectTransform, bool ratio, float x = -999999999, float y = -999999999)
+    {
+        Vector2 newSize;
+
+        SizeMap(ratio, rectTransform.rect.size, ref x, ref y);
+
+        if (ratio)
+        {
+            newSize = rectTransform.rect.size;
+
+            newSize.x *= x;
+            newSize.y *= y;
+        }
+        else
+        {
+            newSize = new Vector2(x, y);
+        }
+
+        rectTransform.sizeDelta = newSize;
+    }
+
+    public static void Resize(this RectTransform rectTransform, bool ratio, Vector2 size)
+    {
+        Vector2 newSize;
+
+        if (ratio)
+        {
+            newSize = rectTransform.rect.size;
+
+            newSize.x *= size.x;
+            newSize.y *= size.y;
+        }
+        else
+        {
+            newSize = size;
+        }
+
+        rectTransform.sizeDelta = newSize;
+    }
+
+
+    public static void Resize(this Text text, bool preferredWidth, bool preferredHeight)
+    {
+        Vector2 newSize = new Vector2();
+
+        if (preferredWidth)
+        {
+            newSize.x = text.preferredWidth;
+        }
+        else
+        {
+            newSize.x = -999999999;
+        }
+
+        if (preferredHeight)
+        {
+            newSize.x = text.preferredHeight;
+        }
+        else
+        {
+            newSize.y = -999999999;
+        }
+
+        text.rectTransform.Resize(false, newSize.x, newSize.y);
+    }
+
+
+    private static void SizeMap(bool ratio, Vector2 size, ref float x, ref float y)
+    {
+        if (ratio)
+        {
+            if (x.Equal(-999999999))
+            {
+                x = 1;
+            }
+
+            if (y.Equal(-999999999))
+            {
+                y = 1;
+            }
+        }
+        else
+        {
+            if (x.Equal(-999999999))
+            {
+                x = size.x;
+            }
+
+            if (y.Equal(-999999999))
+            {
+                y = size.y;
+            }
+        }
+    }
+}

+ 2 - 2
Assets/Script/Extension/ExtensionImage.cs.meta → Assets/Script/Extension/ExtensionResize.cs.meta

@@ -1,6 +1,6 @@
 fileFormatVersion: 2
-guid: 27f5fab8a07e03d43b8e88ed5087c9f4
-timeCreated: 1496149993
+guid: 4a0b30308b458c34795380f6be7f720a
+timeCreated: 1497429014
 licenseType: Pro
 MonoImporter:
   serializedVersion: 2

+ 8 - 10
Assets/Script/Manage/ManaCenter.cs

@@ -3,13 +3,13 @@
 using UnityEngine;
 using UnityEngine.UI;
 using UnityEngine.Events;
+using UnityEngine.Analytics;
 using UnityEngine.EventSystems;
 
 using System;
 using System.Xml;
 using System.Collections;
 using System.Collections.Generic;
-using UnityEngine.Analytics;
 
 public class ManaCenter : Regist 
 {
@@ -148,15 +148,13 @@ public class ManaCenter : Regist
                 }
             }
 
-            //if (Level_ == 200)
-            //{
-            //    if (ManaTutorial.TutorialB_)
-            //    {
-            //        ManaTutorial.TutorialB = true;
-
-            //        ManaTutorial.PrepareStepB1();
-            //    }
-            //}
+            if (Level_ >= 18)
+            {
+                if (ManaTutorial.TutorialB_)
+                {
+                    ManaTutorial.TutorialB = true;
+                }
+            }
         }
     }
     public static float Person

+ 1 - 1
Assets/Script/Manage/ManaGarden.cs

@@ -377,7 +377,7 @@ public class ManaGarden : Regist
 
         image.sprite = flowerInfo.Icon;
 
-        image.Resize(0.65f, 0.65f);
+        image.Resize(true, 0.65f, 0.65f);
     }
 
 

+ 259 - 110
Assets/Script/Manage/ManaMiniGame.cs

@@ -17,6 +17,15 @@ public class Award
     public static int BonusCoin;
     public static int BonusDiamond;
     public static string Info;
+    
+    public int Rate; 
+    public int Coin;
+    public int Score; 
+    public int Diamond; 
+    public bool FlowerFlag;
+    public bool DiamondFlag;
+
+    #region 配置
 
     public static int FlowerID;
     public static bool FlowerLock;
@@ -33,35 +42,35 @@ public class Award
 
     #endregion
 
+    #endregion
+
     public void GetAward(int score)
     {
         #region 获得奖励
 
         #region Rate
 
-        int rate;
+        Score = (int)Mathf.Clamp(score, 1, Mathf.Infinity);
 
-        score = (int)Mathf.Clamp(score, 1, Mathf.Infinity);
-
-        if (score < Standard[1])
+        if (Score < Standard[1])
         {
-            rate = 0;
+            Rate = 0;
         }
-        else if (score < Standard[2])
+        else if (Score < Standard[2])
         {
-            rate = 1;
+            Rate = 1;
         }
         else
         {
-            rate = 2;
+            Rate = 2;
         }
 
         #endregion
 
         #region Reset
 
-        bool flowerFlag = false;
-        bool diamondFlag = false;
+        FlowerFlag = false;
+        DiamondFlag = false;
 
         #endregion
 
@@ -70,46 +79,63 @@ public class Award
 
         #region Coin
 
-        int coin = (int)Auxiliary.FmlParse(CoinFml, "s", score.ToString(), "l", Mathf.Clamp(ManaCenter.Level, 1, 9999).ToString());
-        coin = (int)(coin * (1 + ManaCenter.SkillPlus) + BonusCoin);
-        coin = (int) Mathf.Clamp(coin, 1, Mathf.Infinity);
+        Coin = (int)Auxiliary.FmlParse(CoinFml, "s", Score.ToString(), "l", Mathf.Clamp(ManaCenter.Level, 1, 9999).ToString());
+        Coin = (int)(Coin * (1 + ManaCenter.SkillPlus) + BonusCoin);
+        Coin = (int) Mathf.Clamp(Coin, 1, Mathf.Infinity);
+
+        ManaReso.Get<Text>("Da_CoinLab").text = Coin.ToString();
+        ManaReso.Get<Text>("Da_CoinLab").Resize(true, false);
+        ManaReso.Get<ContentSizeFitter>("Da_CoinGroup").enabled = true;
 
-        ManaCenter.Coin += coin;
+        ManaReso.SetActive("Da_CoinLab", true);
 
-        sb.AppendFormat("{0}{1}{2}    ", Language.GetStr("UI", "J_Info0"), "<(金币)>", coin);
+        ManaCenter.Coin += Coin;
+
+        sb.AppendFormat("{0}{1}{2}    ", Language.GetStr("UI", "J_Info0"), "<(金币)>", Coin);
 
         #endregion
 
         #region Diamond
 
-        int diamond = 0;
         float diamondRate = (float)Auxiliary.FmlParse(DiamondFml, "l", Mathf.Clamp(ManaCenter.Level, 1, 1000).ToString());
 
         if (Random.Range(0, 1f) <= diamondRate)
         {
-            diamondFlag = true;
+            DiamondFlag = true;
+
+            Diamond = (int)(Mathf.Lerp(DiamondMin, DiamondMax, Random.Range(0, 1f)) + BonusDiamond);
+
+            ManaReso.Get<Text>("Da_DiamondLab").text = Diamond.ToString();
+            ManaReso.Get<Text>("Da_DiamondLab").Resize(true, false);
+            ManaReso.Get<ContentSizeFitter>("Da_DiamondGroup").enabled = true;
 
-            diamond = (int)(Mathf.Lerp(DiamondMin, DiamondMax, Random.Range(0, 1f)) + BonusDiamond);
+            ManaReso.SetActive("Da_DiamondLab", true);
 
-            ManaCenter.Diamond += diamond;
+            ManaCenter.Diamond += Diamond;
 
             ManaReso.SetActive("Da_Diamond", true);
 
-            sb.AppendFormat("{0}{1}{2}    ", Language.GetStr("UI", "J_Info0"), "<(钻石)>", diamond);
+            sb.AppendFormat("{0}{1}{2}    ", Language.GetStr("UI", "J_Info0"), "<(钻石)>", Diamond);
         }
         else
         {
             if (BonusDiamond > 0)
             {
-                diamondFlag = true;
+                DiamondFlag = true;
+
+                Diamond = BonusDiamond;
+
+                ManaReso.Get<Text>("Da_DiamondLab").text = Diamond.ToString();
+                ManaReso.Get<Text>("Da_DiamondLab").Resize(true, false);
+                ManaReso.Get<ContentSizeFitter>("Da_DiamondGroup").enabled = true;
 
-                diamond = BonusDiamond;
+                ManaReso.SetActive("Da_DiamondLab", true);
 
-                ManaCenter.Diamond += diamond;
+                ManaCenter.Diamond += Diamond;
 
                 ManaReso.SetActive("Da_Diamond", true);
 
-                sb.AppendFormat("{0}{1}{2}    ", Language.GetStr("UI", "J_Info0"), "<(钻石)>", diamond);
+                sb.AppendFormat("{0}{1}{2}    ", Language.GetStr("UI", "J_Info0"), "<(钻石)>", Diamond);
             }
         }
 
@@ -119,14 +145,14 @@ public class Award
 
         if (ManaTutorial.TutorialA)
         {
-            flowerFlag = true;
+            FlowerFlag = true;
 
             FlowerInfo flowerInfo = ManaGarden.FlowerInfoDic[1];
 
             ManaReso.SetActive("Da_FlowerIcon", true);
 
             ManaReso.Get<Image>("Da_FlowerIcon").sprite = flowerInfo.Icon;
-            ManaReso.Get<Image>("Da_FlowerIcon").Resize(0.2f, 0.2f);
+            ManaReso.Get<Image>("Da_FlowerIcon").Resize(true, 0.2f, 0.2f);
 
             ManaReso.SetText("Da_FlowerLab", flowerInfo.Name);
 
@@ -136,9 +162,9 @@ public class Award
         {       
             if (!FlowerLock)
             {
-                flowerFlag = true;
+                FlowerFlag = true;
 
-                if (Random.Range(0, 1f) <= Odds[rate])
+                if (Random.Range(0, 1f) <= Odds[Rate])
                 {
                     FlowerInfo flowerInfo = ManaGarden.FlowerInfoDic[FlowerID];
 
@@ -148,7 +174,7 @@ public class Award
                     ManaReso.SetActive("Da_Flower", true);
 
                     ManaReso.Get<Image>("Da_FlowerIcon").sprite = flowerInfo.Icon;
-                    ManaReso.Get<Image>("Da_FlowerIcon").Resize(0.2f, 0.2f);
+                    ManaReso.Get<Image>("Da_FlowerIcon").Resize(true, 0.2f, 0.2f);
 
                     ManaReso.SetText("Da_FlowerLab", flowerInfo.Name);
 
@@ -172,12 +198,39 @@ public class Award
 
         #endregion
 
+        ManaReso.Get("Da_Info").TweenForCG();
+
+        //Auxiliary.Instance.DelayCall
+        //    (
+        //        () =>
+        //        {
+        //            Debug.LogError("");
+        //        },
+        //        1
+        //    );
+
+        Auxiliary.Instance.DelayCall
+            (
+                () =>
+                {
+                    ManaReso.Get<Text>("Da_CoinLab").SetLayoutDirty();
+                    ManaReso.Get<Text>("Da_DiamondLab").SetLayoutDirty();
+
+                    ManaReso.Get<ContentSizeFitter>("Da_CoinGroup").enabled = false;
+                    ManaReso.Get<ContentSizeFitter>("Da_DiamondGroup").enabled = false;
+
+                    InitializeAnim();
+                },
+                2
+            );
+    }
+
+    public void InitializeAnim()
+    {
         #region 构造动画
 
         #region Reset
 
-        ManaReso.Get("Da_Info").TweenForCG();
-
         ManaReso.SetText("Da_Tit", Language.GetStr("UI", "Da_Tit1"));
         ManaReso.SetText("Da_CoinLab", "0");
         ManaReso.SetText("Da_DiamondLab", "0");
@@ -193,16 +246,16 @@ public class Award
         ManaReso.SetActive("Da_DiamondLab", false);
 
         ManaReso.SetActive("Da_VGroup", true);
-        ManaReso.SetActive("Da_HGroup", false);
+        ManaReso.SetActive("Da_HGroup1", false);
         ManaReso.SetActive("Da_FlowerGroup", false);
         ManaReso.SetActive("Da_DiamondGroup", false);
 
-        if (flowerFlag)
+        if (FlowerFlag)
         {
             ManaReso.SetActive("Da_FlowerGroup", true);
         }
 
-        if (diamondFlag)
+        if (DiamondFlag)
         {
             ManaReso.SetActive("Da_DiamondGroup", true);
         }
@@ -221,15 +274,15 @@ public class Award
         );
 
 
-        float timeCoin = Mathf.Lerp(0, 1.5f, Mathf.Clamp01(coin / 15f));
-        float timeScore = Mathf.Lerp(0, 1.5f, Mathf.Clamp01(score / 50f));
-        float timeDiamond = Mathf.Lerp(0, 1.5f, Mathf.Clamp01(diamond / 15f));
+        float timeCoin = Mathf.Lerp(0, 1.5f, Mathf.Clamp01(Coin / 15f));
+        float timeScore = Mathf.Lerp(0, 1.5f, Mathf.Clamp01(Score / 50f));
+        float timeDiamond = Mathf.Lerp(0, 1.5f, Mathf.Clamp01(Diamond / 15f));
 
         float time = Mathf.Max(timeCoin, timeDiamond);
-        
-        ManaReso.Get("Da_CoinLab").CreateTweenNumber(0, coin, time, false, true, Curve.EaseOutQuad);
-        ManaReso.Get("Da_ScoreLab").CreateTweenNumber(0, score, timeScore, false, true, Curve.EaseOutQuad);
-        ManaReso.Get("Da_DiamondLab").CreateTweenNumber(0, diamond, time, false, true, Curve.EaseOutQuad);
+
+        ManaReso.Get("Da_CoinLab").CreateTweenNumber(0, Coin, time, false, true, Curve.EaseOutQuad);
+        ManaReso.Get("Da_ScoreLab").CreateTweenNumber(0, Score, timeScore, false, true, Curve.EaseOutQuad);
+        ManaReso.Get("Da_DiamondLab").CreateTweenNumber(0, Diamond, time, false, true, Curve.EaseOutQuad);
 
         #endregion
 
@@ -238,7 +291,7 @@ public class Award
 
         TweenRoot tween;
 
-        if (flowerFlag)
+        if (FlowerFlag)
         {
             tween = ManaReso.Get("Da_CoinLab").GetTweenNumber();
 
@@ -256,7 +309,7 @@ public class Award
 
         #region 按钮
 
-        if (flowerFlag)
+        if (FlowerFlag)
         {
             tween = ManaReso.Get("Da_FlowerGroup").GetTweenScale();
 
@@ -310,15 +363,15 @@ public class Award
 
         #region 得分
 
-        if (rate == 0)
+        if (Rate == 0)
         {
             tween = ManaReso.Get("Da_Star1").GetTweenScale();
         }
-        else if (rate == 1)
+        else if (Rate == 1)
         {
             tween = ManaReso.Get("Da_Star2").GetTweenScale();
         }
-        else if (rate == 2)
+        else if (Rate == 2)
         {
             tween = ManaReso.Get("Da_Star3").GetTweenScale();
         }
@@ -367,17 +420,17 @@ public class Award
             {
                 ManaReso.Get("Da_Star1").TweenReForScale();
 
-                ManaReso.SetActive("Da_HGroup", true);
+                ManaReso.SetActive("Da_HGroup1", true);
             }
         );
 
 
-        if (rate == 0)
+        if (Rate == 0)
         {
             ManaReso.SetActive("Da_Star2", false);
             ManaReso.SetActive("Da_Star3", false);
         }
-        else if (rate == 1)
+        else if (Rate == 1)
         {
             ManaReso.SetActive("Da_Star2", true);
             ManaReso.SetActive("Da_Star3", false);
@@ -394,7 +447,7 @@ public class Award
                 }
             );
         }
-        else if (rate == 2)
+        else if (Rate == 2)
         {
             ManaReso.SetActive("Da_Star2", true);
             ManaReso.SetActive("Da_Star3", true);
@@ -437,7 +490,7 @@ public class Award
             {
                 ManaReso.Get("Da_CoinGroup").TweenReForScale();
 
-                if (diamondFlag)
+                if (DiamondFlag)
                 {
                     ManaReso.Get("Da_DiamondGroup").TweenReForScale();
                 }
@@ -455,7 +508,7 @@ public class Award
             }
         );
 
-        if (diamondFlag)
+        if (DiamondFlag)
         {
             tween = ManaReso.Get("Da_DiamondGroup").GetTweenScale();
 
@@ -836,30 +889,6 @@ public class ManaMiniGame : Regist
     }
 
 
-    public static void Fade()
-    {
-        for (int i = 0; i < IndexList.Count; i++)
-        {
-            Flower flower = FlowerDic[IndexList[i]];
-            
-            if (FadeList.UniqueAdd(flower))
-            {
-                IdleList.Remove(flower);
-
-                flower.PlayParticle();
-
-                flower.FlowerIcon.TweenForSr();
-
-                if (FadeList.Count == 6)
-                {
-                    RoundBegin();
-                }
-                
-                break;
-            }
-        }
-    }
-
     public static void Operate(int index)
     {
         if (Panalty || !FadeList.Valid())
@@ -874,8 +903,19 @@ public class ManaMiniGame : Regist
 
         if (index == IndexList[0])
         {
+            int uiIndex = IndexMap(IndexList[0]);
+
+            ManaReso.Get<Image>("D_FlowerBtn" + uiIndex).material = Shortcut.GrayMat;
+
+            ManaReso.Get<Button>("D_FlowerBtn" + uiIndex).interactable = false;
+
+            ManaReso.Get<Image>("D_FlowerIcon" + uiIndex).material = Shortcut.GrayMat;
+
+            ManaReso.SetActive("D_FlowerTick" + uiIndex, true);
+
             IndexList.RemoveAt(0);
 
+
             Flower flower = FlowerDic[index];
 
             ManaReso.GetHudText("+45", Color.white, 90, flower.ChildDic["ScorePosTra"], ManaReso.Get("D_MiniGame"), true);
@@ -941,6 +981,37 @@ public class ManaMiniGame : Regist
         }
     }
 
+    public static void ResetOprerate()
+    {
+        ManaReso.Get<Image>("D_FlowerBtn1").material = null;
+        ManaReso.Get<Image>("D_FlowerBtn2").material = null;
+        ManaReso.Get<Image>("D_FlowerBtn3").material = null;
+        ManaReso.Get<Image>("D_FlowerBtn4").material = null;
+        ManaReso.Get<Image>("D_FlowerBtn5").material = null;
+        ManaReso.Get<Image>("D_FlowerBtn6").material = null;
+
+        ManaReso.Get<Button>("D_FlowerBtn1").interactable = true;
+        ManaReso.Get<Button>("D_FlowerBtn2").interactable = true;
+        ManaReso.Get<Button>("D_FlowerBtn3").interactable = true;
+        ManaReso.Get<Button>("D_FlowerBtn4").interactable = true;
+        ManaReso.Get<Button>("D_FlowerBtn5").interactable = true;
+        ManaReso.Get<Button>("D_FlowerBtn6").interactable = true;
+
+        ManaReso.Get<Image>("D_FlowerIcon1").material = null;
+        ManaReso.Get<Image>("D_FlowerIcon2").material = null;
+        ManaReso.Get<Image>("D_FlowerIcon3").material = null;
+        ManaReso.Get<Image>("D_FlowerIcon4").material = null;
+        ManaReso.Get<Image>("D_FlowerIcon5").material = null;
+        ManaReso.Get<Image>("D_FlowerIcon6").material = null;
+
+        ManaReso.SetActive("D_FlowerTick1", false);
+        ManaReso.SetActive("D_FlowerTick2", false);
+        ManaReso.SetActive("D_FlowerTick3", false);
+        ManaReso.SetActive("D_FlowerTick4", false);
+        ManaReso.SetActive("D_FlowerTick5", false);
+        ManaReso.SetActive("D_FlowerTick6", false);
+    }
+
     public static void CreateOperate()
     {
         ManaAudio.PlayClip(Clip.BubbleClip);
@@ -982,6 +1053,63 @@ public class ManaMiniGame : Regist
         }
     }
 
+
+    public static void Fade()
+    {
+        for (int i = 0; i < IndexList.Count; i++)
+        {
+            Flower flower = FlowerDic[IndexList[i]];
+
+            if (FadeList.UniqueAdd(flower))
+            {
+                IdleList.Remove(flower);
+
+                flower.PlayParticle();
+
+                flower.FlowerIcon.TweenForSr();
+
+                if (FadeList.Count == 6)
+                {
+                    RoundBegin();
+                }
+
+                break;
+            }
+        }
+    }
+
+    public static void InitializeMode()
+    {
+        GameA = false;
+        GameB = false;
+
+        D_Operate1.SetActive(false);
+        D_Operate2.SetActive(false);
+
+        if (ManaCenter.Level >= 18)
+        {
+            if (ManaTutorial.TutorialB)
+            {
+                GameB = true;
+            }
+            else
+            {
+                if (Random.Range(0f, 1f) <= 0.5f)
+                {
+                    GameB = true;
+                }
+                else
+                {
+                    GameA = true;
+                }
+            }
+        }
+        else
+        {
+            GameA = true;
+        }
+    }
+
     public static void InitializeAward()
     {
         float flowerRate = (float)Auxiliary.FmlParse(Award.FlowerFml, "l", ManaCenter.Level.ToString(), "f", ManaGarden.MyFlower.ToString());
@@ -1013,32 +1141,6 @@ public class ManaMiniGame : Regist
         }
     }
 
-    public static void InitializeMode()
-    {
-        GameA = false;
-        GameB = false;
-
-        D_Operate1.SetActive(false);
-        D_Operate2.SetActive(false);
-
-        GameA = true;
-        //if (ManaCenter.Level >= 18)
-        //{
-        //    if (Random.Range(0f, 1f) <= 0.5f)
-        //    {
-        //        GameB = true;
-        //    }
-        //    else
-        //    {
-        //        GameA = true;
-        //    }
-        //}
-        //else
-        //{
-        //    GameA = true;
-        //}
-    }
-
 
     public static void GameEnd()
     {
@@ -1115,6 +1217,11 @@ public class ManaMiniGame : Regist
             }
         }
 
+        if (ManaTutorial.TutorialB)
+        {
+            InitializeMode();
+        }
+
         if (GameA)
         {
             GameEnterA();
@@ -1212,6 +1319,10 @@ public class ManaMiniGame : Regist
         PrepareLab.SetParent(ManaReso.Get("D_PrepareLayout2"));
 
 
+        ResetOprerate();
+
+        ManaReso.Get("D_Mask").TweenBacGra();
+
         ManaReso.SetActive("D_FlowerBtn1", false);
         ManaReso.SetActive("D_FlowerBtn2", false);
         ManaReso.SetActive("D_FlowerBtn3", false);
@@ -1283,8 +1394,6 @@ public class ManaMiniGame : Regist
         {
             IdleList[i].FlowerIcon.CreateTweenSr(1, 0, 0.25f, true, false, Curve.EaseOutQuad, false, true);
         }
-
-        ManaReso.Get("D_Mask").TweenBacGra();
     }
 
     public static void GameBegin()
@@ -1359,12 +1468,12 @@ public class ManaMiniGame : Regist
             ManaReso.SetActive("D_FlowerBtn5", true);
             ManaReso.SetActive("D_FlowerBtn6", true);
 
-            ManaReso.SetSprite("D_FlowerIcon1", FlowerDic[1].FlowerInfo.Icon).Resize(1f, 1f);
-            ManaReso.SetSprite("D_FlowerIcon2", FlowerDic[2].FlowerInfo.Icon).Resize(1f, 1f);
-            ManaReso.SetSprite("D_FlowerIcon3", FlowerDic[4].FlowerInfo.Icon).Resize(1f, 1f);
-            ManaReso.SetSprite("D_FlowerIcon4", FlowerDic[5].FlowerInfo.Icon).Resize(1f, 1f);
-            ManaReso.SetSprite("D_FlowerIcon5", FlowerDic[7].FlowerInfo.Icon).Resize(1f, 1f);
-            ManaReso.SetSprite("D_FlowerIcon6", FlowerDic[8].FlowerInfo.Icon).Resize(1f, 1f);
+            ManaReso.SetSprite("D_FlowerIcon1", FlowerDic[1].FlowerInfo.Icon).Resize(true, 1f, 1f);
+            ManaReso.SetSprite("D_FlowerIcon2", FlowerDic[2].FlowerInfo.Icon).Resize(true, 1f, 1f);
+            ManaReso.SetSprite("D_FlowerIcon3", FlowerDic[4].FlowerInfo.Icon).Resize(true, 1f, 1f);
+            ManaReso.SetSprite("D_FlowerIcon4", FlowerDic[5].FlowerInfo.Icon).Resize(true, 1f, 1f);
+            ManaReso.SetSprite("D_FlowerIcon5", FlowerDic[7].FlowerInfo.Icon).Resize(true, 1f, 1f);
+            ManaReso.SetSprite("D_FlowerIcon6", FlowerDic[8].FlowerInfo.Icon).Resize(true, 1f, 1f);
         }
 
         PrepareLab.StreamForScale();
@@ -1401,11 +1510,51 @@ public class ManaMiniGame : Regist
 
             i--;
         }
+
+        ResetOprerate();
     }
 
     public static void RoundBegin()
     {
         ManaReso.Get("D_Mask").TweenBacGra();
+
+        if (ManaTutorial.TutorialB)
+        {
+            ManaTutorial.EnterB1();
+        }
+    }
+
+
+    public static int IndexMap(int slotIndex)
+    {
+        if (slotIndex == 1)
+        {
+            return 1;
+        }
+        else if (slotIndex == 2)
+        {
+            return 2;
+        }
+        else if (slotIndex == 4)
+        {
+            return 3;
+        }
+        else if (slotIndex == 5)
+        {
+            return 4;
+        }
+        else if (slotIndex == 7)
+        {
+            return 5;
+        }
+        else if (slotIndex == 8)
+        {
+            return 6;
+        }
+        else
+        {
+            throw new Exception();
+        }
     }
 
 

+ 4 - 4
Assets/Script/Manage/ManaSign.cs

@@ -124,7 +124,7 @@ public class Sign
 
                     ManaReso.SetSprite("Bb_IconA0", flowerInfo.Icon);
 
-                    ManaReso.Get<Image>("Bb_IconA0").Resize(0.65f, 0.65f);
+                    ManaReso.Get<Image>("Bb_IconA0").Resize(true, 0.65f, 0.65f);
 
                     flowerInfo.Unlock = true;
 
@@ -170,7 +170,7 @@ public class Sign
                 if (flowerInfo.Unlock == false)
                 {
                     Icon.sprite = flowerInfo.Icon;
-                    Icon.Resize(0.2f, 0.2f);
+                    Icon.Resize(true, 0.2f, 0.2f);
 
                     return;
                 }
@@ -180,14 +180,14 @@ public class Sign
         if (Diamond > 0)
         {
             Icon.sprite = ManaReso.LoadSprite("钻石", Folder.UI);
-            Icon.Resize(OriginSize);
+            Icon.Resize(false, OriginSize);
 
             Lab1.text = Diamond.ToString();
         }
         else if (Coin > 0)
         {
             Icon.sprite = ManaReso.LoadSprite("金币", Folder.UI);
-            Icon.Resize(OriginSize);
+            Icon.Resize(false, OriginSize);
 
             Lab1.text = Coin.ToString();
         }

+ 87 - 162
Assets/Script/Manage/ManaTutorial.cs

@@ -699,7 +699,27 @@ public class ManaTutorial : Regist
 
     public static void EndB1()
     {
-        Tutorial.HightDisable();
+        Tutorial.HightDisable(0, false);
+    }
+
+    public static void EndB2()
+    {
+        Tutorial.HightDisable(0, false);
+    }
+
+    public static void EndB3()
+    {
+        Tutorial.HightDisable(0, false);
+    }
+
+    public static void EndB4()
+    {
+        Tutorial.HightDisable(0, false);
+    }
+
+    public static void EndB5()
+    {
+        Tutorial.HightDisable(0, false);
     }
 
     public static void EndB()
@@ -708,219 +728,124 @@ public class ManaTutorial : Regist
 
         TutorialB = false;
 
-        PayExemptAmt = 0;
-        ConnectExemptAmt = 0;
+        ManaMiniGame.Pause = false;
     }
 
 
     public static void EnterB1()
     {
-        TutorialB = false;
         TutorialB_ = false;
 
         ManaReso.Get("N_Mask").TweenForGra();
 
-        ManaReso.Get("Fe_Info").TweenBacCG();
-
         ManaReso.SetActive("N_Tutorial", true);
 
 
-        Ability skill = (Ability) ManaCenter.SkillDic["Ability2"];
+        ManaMiniGame.Pause = true;
 
-        if (skill.ItemStatus == SkillStatus.Upgrade)
-        {
-            EnterB3();
-        }
-        else
-        {
-            MoveRoot move = ManaReso.Get<ScrollRect>("Fa_Scrr").Locate(skill.SkillItem, 1, Curve.EaseOutQuad, LocatePos.Middle);
+        int index = ManaMiniGame.IndexMap(ManaMiniGame.IndexList[0]);
 
-            move.AddEventOnetime
+        Tutorial.HightScreen(ManaReso.Get("D_FlowerArrow" + index), ManaReso.Get("D_FlowerBtn" + index));
+
+        ManaReso.AddButtonEventOnetime
             (
-                EventType.ForwardFinish,
+                "D_FlowerBtn" + index,
                 () =>
                 {
-                    Tutorial.HightScreen(skill.SkillItem.FindChild("Arrow0"), skill.SkillItem.FindChild("Arrow1"), skill.SkillItem.FindChild("Btn"));
+                    EndB1();
+                    EnterB2();
                 }
             );
+    }
+
+    public static void EnterB2()
+    {
+        int index = ManaMiniGame.IndexMap(ManaMiniGame.IndexList[0]);
 
+        Tutorial.HightScreen(ManaReso.Get("D_FlowerArrow" + index), ManaReso.Get("D_FlowerBtn" + index));
 
-            skill.ItemBtn.AddButtonEventOnetime
+        ManaReso.AddButtonEventOnetime
             (
+                "D_FlowerBtn" + index,
                 () =>
                 {
-                    Tutorial.HightDisable(0, true);
+                    EndB2();
+                    EnterB3();
                 }
             );
+    }
 
+    public static void EnterB3()
+    {
+        int index = ManaMiniGame.IndexMap(ManaMiniGame.IndexList[0]);
 
-            TweenRoot tween = ManaReso.Get("Fe_Info").GetTweenCG();
+        Tutorial.HightScreen(ManaReso.Get("D_FlowerArrow" + index), ManaReso.Get("D_FlowerBtn" + index));
 
-            tween.AddEventOnetime
+        ManaReso.AddButtonEventOnetime
             (
-                EventType.ForwardFinish,
+                "D_FlowerBtn" + index,
                 () =>
                 {
-                    Tutorial.HightScreen(ManaReso.Get("Fe_Arrow0"), ManaReso.Get("Fe_Arrow1"), ManaReso.Get("Fe_Btn"));
-
-                    ManaReso.AddButtonEventOnetime
-                    (
-                        "Fe_Btn",
-                        () =>
-                        {
-                            EndB1();
-
-                            move = ManaReso.Get("MainCamera").CreateZoom2D();
-
-                            move.AddEventOnetime
-                            (
-                                EventType.ForwardFinish,
-                                () =>
-                                {
-                                    EnterB2();
-                                }
-                            );
-                        }
-                    );
+                    EndB3();
+                    EnterB4();
                 }
             );
-        }
     }
 
-    public static void EnterB2()
+    public static void EnterB4()
     {
-        ManaReso.Get("N_Mask").TweenForGra();
+        int index = ManaMiniGame.IndexMap(ManaMiniGame.IndexList[0]);
 
-        TweenRoot tween = ManaReso.Get("F_Manage0").TweenForVec();
+        Tutorial.HightScreen(ManaReso.Get("D_FlowerArrow" + index), ManaReso.Get("D_FlowerBtn" + index));
 
-        tween.AddEventOnetime
-        (
-            EventType.ForwardFinish,
-            () =>
-            {
-                Auxiliary.Instance.DelayCall
-                (
-                    () =>
-                    {
-                        ManaReso.Get<Button>("F_Elf").onClick.Invoke();
-                    },
-                    0.25f
-                );
-
-                Auxiliary.Instance.DelayCall
-                (
-                    () =>
-                    {
-                        Transform item = ManaCenter.SkillDic["Ability5"].SkillItem;
-
-                        Tutorial.HightScreen(item.FindChild("Arrow0"), item.FindChild("Arrow1"), item.FindChild("Btn"));
-                    },
-                    0.5f
-                );
-            }
-        );
-
-
-        Ability skill = (Ability) ManaCenter.SkillDic["Ability5"];
-
-        skill.ItemBtn.AddButtonEventOnetime
-        (
-            () =>
-            {
-                Tutorial.HightDisable(0, false);
-            }
-        );
-
-
-        tween = ManaReso.Get("Fe_Info").GetTweenCG();
-
-        tween.AddEventOnetime
-        (
-            EventType.ForwardFinish,
-            () =>
-            {
-                Tutorial.HightScreen(ManaReso.Get("Fe_Arrow0"), ManaReso.Get("Fe_Arrow1"), ManaReso.Get("Fe_Btn"));
-
-                ManaReso.AddButtonEventOnetime
-                (
-                    "Fe_Btn",
-                    () =>
-                    {
-                        EndB();
-                    }
-                );
-            }
-        );
+        ManaReso.AddButtonEventOnetime
+            (
+                "D_FlowerBtn" + index,
+                () =>
+                {
+                    EndB4();
+                    EnterB5();
+                }
+            );
     }
 
-    public static void EnterB3()
+    public static void EnterB5()
     {
-        TweenRoot tween = ManaReso.Get("Fe_Info").TweenBacCG();
-
-        tween.AddEventOnetime
-        (
-            EventType.BackwardFinish,
-            () =>
-            {
-                Auxiliary.Instance.DelayCall
-                (
-                    () =>
-                    {
-                        ManaReso.Get<Button>("F_Elf").onClick.Invoke();
-                    },
-                    0.25f
-                );
-
-                Auxiliary.Instance.DelayCall
-                (
-                    () =>
-                    {
-                        Transform item = ManaCenter.SkillDic["Ability5"].SkillItem;
-
-                        Tutorial.HightScreen(item.FindChild("Arrow0"), item.FindChild("Arrow1"), item.FindChild("Btn"));
-                    },
-                    0.5f
-                );
-            }
-        );
-
+        int index = ManaMiniGame.IndexMap(ManaMiniGame.IndexList[0]);
 
-        Ability skill = (Ability)ManaCenter.SkillDic["Ability5"];
-
-        skill.ItemBtn.AddButtonEventOnetime
-        (
-            () =>
-            {
-                Tutorial.HightDisable(0, false);
-            }
-        );
+        Tutorial.HightScreen(ManaReso.Get("D_FlowerArrow" + index), ManaReso.Get("D_FlowerBtn" + index));
 
+        ManaReso.AddButtonEventOnetime
+            (
+                "D_FlowerBtn" + index,
+                () =>
+                {
+                    EndB5();
+                    EnterB6();
+                }
+            );
+    }
 
-        tween = ManaReso.Get("Fe_Info").GetTweenCG();
+    public static void EnterB6()
+    {
+        int index = ManaMiniGame.IndexMap(ManaMiniGame.IndexList[0]);
 
-        tween.AddEventOnetime
-        (
-            EventType.ForwardFinish,
-            () =>
-            {
-                Tutorial.HightScreen(ManaReso.Get("Fe_Arrow0"), ManaReso.Get("Fe_Arrow1"), ManaReso.Get("Fe_Btn"));
+        Tutorial.HightScreen(ManaReso.Get("D_FlowerArrow" + index), ManaReso.Get("D_FlowerBtn" + index));
 
-                ManaReso.AddButtonEventOnetime
-                (
-                    "Fe_Btn",
-                    () =>
-                    {
-                        EndB();
-                    }
-                );
-            }
-        );
+        ManaReso.AddButtonEventOnetime
+            (
+                "D_FlowerBtn" + index,
+                () =>
+                {
+                    EndB();
+                }
+            );
     }
 }
 
 #region DebugList
 
-//教程有A、C两部分
+//教程有A,B,C三部分
 
 //教程结束后各部分能否正常运行
 //教程的存档

+ 2 - 2
Assets/Script/Manage/ManaUI.cs

@@ -436,7 +436,7 @@ public class ManaUI : Regist
                 ManaReso.SetActive("Da_CoinLab", true);
                 ManaReso.SetActive("Da_DiamondLab", true);
 
-                ManaReso.SetActive("Da_HGroup", false);
+                ManaReso.SetActive("Da_HGroup1", false);
                 ManaReso.SetActive("Da_ScoreTit", false);
                 ManaReso.SetActive("Da_GetAward", false);
                 ManaReso.SetActive("Da_FlowerGroup", false);
@@ -452,7 +452,7 @@ public class ManaUI : Regist
                     ManaReso.SetActive("Da_Flower", true);
 
                     ManaReso.Get<Image>("Da_FlowerIcon").sprite = flowerInfo.Icon;
-                    ManaReso.Get<Image>("Da_FlowerIcon").Resize(0.2f, 0.2f);
+                    ManaReso.Get<Image>("Da_FlowerIcon").Resize(true, 0.2f, 0.2f);
 
                     ManaReso.SetText("Da_FlowerLab", Language.GetStr("FlowerName", "Flower" + flowerInfo.ID_));
 

+ 8 - 5
Assets/Script/Object/Drop.cs

@@ -61,13 +61,16 @@ public class Drop : Regist,IPointerClickHandler
 
     public void FixedUpdate()
     {
-        Timer += Time.fixedDeltaTime;
-
-        if (Timer > 5)
+        if (!ManaMiniGame.Pause)
         {
-            Retrieve();
+            Timer += Time.fixedDeltaTime;
+
+            if (Timer > 5)
+            {
+                Retrieve();
 
-            ManaMiniGame.DropList.Remove(this);
+                ManaMiniGame.DropList.Remove(this);
+            }
         }
 
         if (MoveLock)

+ 1 - 1
Assets/Script/Object/Flower.cs

@@ -134,7 +134,7 @@ public class FlowerInfo
 
         Image.sprite = Icon;
 
-        Image.Resize(0.2f, 0.2f);
+        Image.Resize(true, 0.2f, 0.2f);
 
         Button.onClick.AddListener
         (

+ 3 - 3
Assets/Script/Tool/Auxiliary.cs

@@ -124,17 +124,17 @@ public class Auxiliary : Regist
 
         if (Input.GetKeyDown(KeyCode.Z))
         {
-            
+            ManaCenter.MiniTimer = 0;
         }
 
         if (Input.GetKeyDown(KeyCode.X))
         {
-            
+            ManaMiniGame.GameTimer = 45;
         }
 
         if (Input.GetKeyDown(KeyCode.C))
         {
-            
+            ManaMiniGame.Score = 2000;
         }
 
         if (Input.GetKeyDown(KeyCode.V))

+ 24 - 2
ToList.txt

@@ -1,3 +1,25 @@
-小游戏2教程
+还原PlayerConfig
 
-监督补上循环特效
+关闭调试界面
+
+关闭调试按键
+
+注意存档覆盖情况
+
+
+监督补上循环特效
+
+
+装个WPS
+
+Hud的重用
+
+小游戏Hud的层级
+
+切换材质时的颜色
+
+Da_Info的VerticalLayout
+
+弹出退出小游戏界面时也要刷新金币和钻石的Layout和宽度
+
+TweenNumber加一个Prefix和Epilogue功能