Browse Source

Output interface

LiuQilin 8 years ago
parent
commit
2385df039f

BIN
.vs/MyLovelyGarden/v14/.suo


BIN
Assets/Resource/Logo.unity


BIN
Assets/Resource/Prefab/Object/LightwallUI.prefab


BIN
Assets/Resource/Prefab/PrefabUI/GroupA.prefab


BIN
Assets/Resource/Prefab/PrefabUI/GroupB.prefab


BIN
Assets/Resource/Sprite/SpriteUI/Atlas.png


+ 23 - 9
Assets/Resource/Sprite/SpriteUI/Atlas.png.meta

@@ -1,11 +1,12 @@
 fileFormatVersion: 2
 guid: 64ace2edec65be1458f4f6c09ae97699
-timeCreated: 1490457754
+timeCreated: 1495447518
 licenseType: Pro
 TextureImporter:
   fileIDToRecycleName:
     21300000: "\u91D1\u5E01"
     21300002: "\u94BB\u77F3"
+    21300004: "\u82B1\u6735"
   serializedVersion: 4
   mipmaps:
     mipMapMode: 0
@@ -96,13 +97,13 @@ TextureImporter:
     serializedVersion: 2
     sprites:
     - serializedVersion: 2
-      name: "\u91D1\u5E01"
+      name: "\u82B1\u6735"
       rect:
         serializedVersion: 2
-        x: 13
-        y: 14
-        width: 89
-        height: 89
+        x: 3
+        y: 108
+        width: 196
+        height: 183
       alignment: 0
       pivot: {x: 0.5, y: 0.5}
       border: {x: 0, y: 0, z: 0, w: 0}
@@ -112,10 +113,23 @@ TextureImporter:
       name: "\u94BB\u77F3"
       rect:
         serializedVersion: 2
-        x: 116
-        y: 14
+        x: 5
+        y: 10
         width: 89
-        height: 89
+        height: 88
+      alignment: 0
+      pivot: {x: 0.5, y: 0.5}
+      border: {x: 0, y: 0, z: 0, w: 0}
+      outline: []
+      tessellationDetail: 0
+    - serializedVersion: 2
+      name: "\u91D1\u5E01"
+      rect:
+        serializedVersion: 2
+        x: 104
+        y: 11
+        width: 88
+        height: 87
       alignment: 0
       pivot: {x: 0.5, y: 0.5}
       border: {x: 0, y: 0, z: 0, w: 0}

+ 1 - 7
Assets/Resource/XML/Config/visit_config.xml

@@ -1,5 +1,5 @@
 <data>
-  <item id="1" award_rate="0.5" award_min="1" award_max="l*0.5" cool_time="5" cost="5+l*0.8" create="0.75" level_min="" level_max="43200" />
+  <item id="1" award_rate="0.5" award_min="1" award_max="l*0.5" cool_time="5" cost="5+l*0.8" create="0.75" />
   <comment>
     <id>
 id
@@ -22,11 +22,5 @@ id
     <create>
 用代码生成花园的概率
 </create>
-    <level_min>
-最小花园等级
-</level_min>
-    <level_max>
-最大花园等级
-</level_max>
   </comment>
 </data>

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

@@ -1,8 +1,8 @@
 <PlayerConfig>
-  <Version value="181" />
+  <Version value="219" />
 
   <ID value="Default" />
-////  <TutorialA value="0" />
+////  <TutorialA value="1" />
   <TutorialB value="1" />
 ////  <TutorialC value="0" />
   <TutorialIndexA value="1" />
@@ -17,7 +17,7 @@
   
   <Slot value="1" />
   <Coin value="0" />
-////  <Level value="20" />
+////  <Level value="0" />
   <Diamond value="0" />
   <SignIndex value="1" />
   <SignRound value="1" />

+ 2 - 0
Assets/Resource/XML/lan/ChineseSimplified.xml

@@ -74,6 +74,8 @@
     <Lb_Send1 desc=""><![CDATA[请勿重复提交]]></Lb_Send1>
     <Lb_Send2 desc=""><![CDATA[内容不能为空]]></Lb_Send2>
     <M_Tit desc=""><![CDATA[成就]]></M_Tit>
+    <J_Info0 desc=""><![CDATA[获得]]></J_Info0>
+    <J_Info1 desc=""><![CDATA[使用技能:]]></J_Info1>
   </UI>
   <FlowerName>
     <Flower1 desc=""><![CDATA[粉色小花]]></Flower1>

+ 2 - 0
Assets/Resource/XML/lan/ChineseTraditional.xml

@@ -74,6 +74,8 @@
     <Lb_Send1 desc=""><![CDATA[請勿重複提交]]></Lb_Send1>
     <Lb_Send2 desc=""><![CDATA[內容不能為空]]></Lb_Send2>
     <M_Tit desc=""><![CDATA[成就]]></M_Tit>
+    <J_Info0 desc=""><![CDATA[獲得]]></J_Info0>
+    <J_Info1 desc=""><![CDATA[使用技能:]]></J_Info1>
   </UI>
   <FlowerName>
     <Flower1 desc=""><![CDATA[粉色小花]]></Flower1>

+ 2 - 0
Assets/Resource/XML/lan/English.xml

@@ -74,6 +74,8 @@
     <Lb_Send1 desc=""><![CDATA[Please submit only once]]></Lb_Send1>
     <Lb_Send2 desc=""><![CDATA[Content must not be empty]]></Lb_Send2>
     <M_Tit desc=""><![CDATA[Achievement]]></M_Tit>
+    <J_Info0 desc=""><![CDATA[Get]]></J_Info0>
+    <J_Info1 desc=""><![CDATA[Use skill:]]></J_Info1>
   </UI>
   <FlowerName>
     <Flower1 desc=""><![CDATA[Pink Flower]]></Flower1>

BIN
Assets/Resource/Xlsx/language_config.xlsx


+ 1 - 0
Assets/Script/Manage/Initializer.cs

@@ -41,6 +41,7 @@ public class Initializer : MonoBehaviour
         gameObject.AddScript<ManaAchieve>();
 
         gameObject.AddScript<ManaUI>();
+        gameObject.AddScript<ManaInfo>();
         gameObject.AddScript<ManaSign>();
         gameObject.AddScript<ManaGarden>();
 

+ 3 - 10
Assets/Script/Manage/ManaData.cs

@@ -293,7 +293,6 @@ public class ManaData : Regist
     private static double Coin_;
     private static double Diamond_;
 
-    public static int MainDepth;
     public static bool Reset;
     public static bool MiniValid;
     public static bool FirstFrame = true;
@@ -462,10 +461,7 @@ public class ManaData : Regist
         {
             OpTimer = 0;
 
-            if (MainDepth == 0)
-            {
-                ManaReso.Get("C_Group").TweenConForCG();
-            }
+            ManaReso.Get("C_Group").TweenConForCG();
         }
         else
         {
@@ -475,10 +471,7 @@ public class ManaData : Regist
             {
                 OpTimer = 0;
 
-                if (MainDepth == -1)
-                {
-                    ManaReso.Get("C_Group").TweenConBacCG();
-                }
+                ManaReso.Get("C_Group").TweenConBacCG();
             }
         }
     }
@@ -538,7 +531,7 @@ public class ManaData : Regist
 
         RegistSkill();
         RegistIncome();
-
+        
         if (OfflineValid)
         {
             if (!ManaTutorial.TutorialA && !ManaTutorial.TutorialB)

+ 86 - 0
Assets/Script/Manage/ManaInfo.cs

@@ -0,0 +1,86 @@
+using UnityEngine;
+
+using System.Collections;
+using System.Collections.Generic;
+using System.Text;
+using UnityEngine.UI;
+
+public class ManaInfo : Regist 
+{
+    #region 变量
+
+    public static Text Text
+    {
+        get
+        {
+            if (Text_ == null)
+            {
+                Text_ = ManaReso.Get<Text>("J_Info");
+            }
+
+            return Text_;
+        }
+        set { Text_ = value; }
+    }
+
+    public static Text Text_;
+
+    public static bool Lock;
+    public static float Timer;
+
+    public static List<string> StrList = new List<string>();
+
+    #endregion
+
+    public void FixedUpdate()
+    {
+        Timer -= Time.fixedDeltaTime;
+
+        if (Timer <= 0 && Lock == true)
+        {
+            Lock = false;
+
+            Text.TweenBacCG();
+        }
+    }
+
+
+    public static void Show(string str, float time)
+    {
+        StrList.Insert(0, str);
+        
+        if (StrList.Count == 1)
+        {
+            Text.text = str;
+        }
+        else if (StrList.Count == 6)
+        {
+            StrList.RemoveAt(5);
+
+            StringBuilder sb = new StringBuilder();
+
+            for (int i = 0; i < StrList.Count; i++)
+            {
+                if (i < 4)
+                {
+                    sb.Append(StrList[i] + '\n');
+                }
+                else
+                {
+                    sb.Append(StrList[i]);
+                }
+            }
+
+            Text.text = sb.ToString();
+        }
+        else
+        {
+            Text.text = str + "\n" + Text.text;
+        }
+
+        Text.TweenConForCG();
+
+        Lock = true;
+        Timer = time;
+    }
+}

+ 12 - 0
Assets/Script/Manage/ManaInfo.cs.meta

@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 9a8b50b120796d04eb78234fead81edb
+timeCreated: 1495420329
+licenseType: Pro
+MonoImporter:
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 47 - 32
Assets/Script/Manage/ManaMiniGame.cs

@@ -6,7 +6,7 @@ using System;
 using System.Xml;
 using System.Collections;
 using System.Collections.Generic;
-
+using System.Text;
 using Random = UnityEngine.Random;
 
 public class Award
@@ -15,6 +15,7 @@ public class Award
 
     public static int BonusCoin;
     public static int BonusDiamond;
+    public static string Info;
 
     public int DiamondMin;
     public int DiamondMax;
@@ -92,6 +93,8 @@ public class Award
         #endregion
 
 
+        StringBuilder sb = new StringBuilder();
+
         #region Coin
 
         int coin = (int)Auxiliary.FmlParse(CoinFml, "s", score.ToString(), "l", Mathf.Clamp(ManaData.Level, 1, 9999).ToString());
@@ -99,6 +102,43 @@ public class Award
 
         ManaData.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(ManaData.Level, 1, 1000).ToString());
+        
+        if (Random.Range(0, 1f) <= diamondRate)
+        {
+            diamondFlag = true;
+
+            diamond = (int) (Mathf.Lerp(DiamondMin, DiamondMax, Random.Range(0, 1f)) + BonusDiamond);
+
+            ManaData.Diamond += diamond;
+
+            ManaReso.SetActive("Da_Diamond", true);
+
+            sb.AppendFormat("{0}{1}{2}    ", Language.GetStr("UI", "J_Info0"), "<(钻石)>", diamond);
+        }
+        else
+        {
+            if (BonusDiamond > 0)
+            {
+                diamondFlag = true;
+
+                diamond = BonusDiamond;
+
+                ManaData.Diamond += diamond;
+                
+                ManaReso.SetActive("Da_Diamond", true);
+
+                sb.AppendFormat("{0}{1}{2}    ", Language.GetStr("UI", "J_Info0"), "<(钻石)>", diamond);
+            }
+        }
+
         #endregion
 
         #region Flower
@@ -117,6 +157,8 @@ public class Award
             ManaReso.Get<Image>("Da_FlowerIcon").rectTransform.sizeDelta = newSize;
 
             ManaReso.SetText("Da_FlowerLab", Language.GetStr("FlowerName", "Flower" + flowerInfo.ID_));
+
+            sb.AppendFormat("{0}{1}{2}", Language.GetStr("UI", "J_Info0"), "<(花朵)>", flowerInfo.Name);
         }
         else
         {
@@ -143,6 +185,8 @@ public class Award
 
                             ManaReso.SetText("Da_FlowerLab", Language.GetStr("FlowerName", "Flower" + flowerInfo.ID_));
 
+                            sb.AppendFormat("{0}{1}{2}", Language.GetStr("UI", "J_Info0"), "<(花朵)>", flowerInfo.Name);
+
                             break;
                         }
                     }
@@ -152,36 +196,7 @@ public class Award
 
         #endregion
 
-        #region Diamond
-
-        int diamond = 0;
-        float diamondRate = (float)Auxiliary.FmlParse(DiamondFml, "l", Mathf.Clamp(ManaData.Level, 1, 1000).ToString());
-        
-        if (Random.Range(0, 1f) <= diamondRate)
-        {
-            diamondFlag = true;
-
-            diamond = (int) (Mathf.Lerp(DiamondMin, DiamondMax, Random.Range(0, 1f)) + BonusDiamond);
-
-            ManaData.Diamond += diamond;
-
-            ManaReso.SetActive("Da_Diamond", true);
-        }
-        else
-        {
-            if (BonusDiamond > 0)
-            {
-                diamondFlag = true;
-
-                diamond = BonusDiamond;
-
-                ManaData.Diamond += diamond;
-                
-                ManaReso.SetActive("Da_Diamond", true);
-            }
-        }
-
-        #endregion
+        Info = sb.ToString();
 
         BonusCoin = 0;
         BonusDiamond = 0;
@@ -622,7 +637,7 @@ public class ManaMiniGame : Regist
     public static float OpTime = 1.5f;
     public static float OpTimer;
     public static float GoldTimer;
-    public static float GameTime = 45;
+    public static float GameTime = 5;
     public static float PanaltyTime = 1;
     public static float NewOpTime;
     public static float PanaltyTimer;

+ 41 - 60
Assets/Script/Manage/ManaUI.cs

@@ -8,6 +8,7 @@ using System;
 using System.Xml;
 using System.Collections;
 using System.Collections.Generic;
+
 using UnityEngine.Events;
 using Random = UnityEngine.Random;
 
@@ -83,12 +84,13 @@ public class ManaUI : Regist
 
         tween.OnForwardStart += () =>
         {
-            ManaData.MainDepth++;
+            ManaReso.Get("C_Main").TweenBacCG();
         };
 
-        tween.OnBackwardFinish += () =>
+         tween.OnBackwardFinish += () =>
         {
-            ManaData.MainDepth--;
+            ManaReso.Get("C_Main").TweenForCG();
+            ManaReso.Get("C_Group").GetTweenCG().InOrigin = true;
 
             ManaReso.Get("Bb_SignIn").TweenBacCG();
 
@@ -188,19 +190,15 @@ public class ManaUI : Regist
 
         ManaLan.Add(ManaReso.Get<Text>("C_MiniGameLab"), new LanStr("UI", "C_MiniGameLab"));
 
-        #region C_Group
+        #region C_Main
 
-        tween = ManaReso.Get("C_Group").CreateTweenCG(0, 1, 0.25f, false, true, Curve.EaseOutQuad);
+        ManaReso.Get("C_Main").CreateTweenCG(0, 1, 0.25f, false, true, Curve.EaseOutQuad);
 
-        tween.OnForwardStart += () =>
-        {
-            ManaData.MainDepth = -1;
-        };
+        #endregion
 
-        tween.OnBackwardStart += () =>
-        {
-            ManaData.MainDepth = 0;
-        };
+        #region C_Group
+
+        ManaReso.Get("C_Group").CreateTweenCG(0, 1, 0.25f, false, true, Curve.EaseOutQuad);
 
         #endregion
 
@@ -542,7 +540,7 @@ public class ManaUI : Regist
 
         tween.OnForwardStart += () =>
         {
-            ManaReso.Get("C_Group").TweenBacCG();
+            ManaReso.Get("C_Main").TweenBacCG();
 
             ManaAudio.MusicTheme.TweenBacAudio();
 
@@ -550,8 +548,6 @@ public class ManaUI : Regist
             ManaReso.SetText("D_BeginLab", Language.GetStr("UI", "D_BeginLab0"));
             ManaReso.SetText("D_StatusLab", Language.GetStr("UI", "D_StatusLab0"));
 
-            ManaData.MainDepth++;
-
             ManaGarden.AwardValid = false;
         };
 
@@ -567,6 +563,9 @@ public class ManaUI : Regist
 
         tween.OnBackwardFinish += () =>
         {
+            ManaReso.Get("C_Main").TweenForCG();
+            ManaReso.Get("C_Group").GetTweenCG().InOrigin = true;
+
             ManaAudio.MusicTheme.TweenForAudio();
 
             ManaGarden.AwardValid = true;
@@ -640,7 +639,6 @@ public class ManaUI : Regist
             () =>
             {
                 ManaAudio.PlayClip(Clip.CloseClip);
-                ManaReso.Get("C_Group").TweenForCG();
 
                 ManaReso.Get("Da_Info").TweenBacCG();
                 ManaReso.Get("GardenMini").TweenBacVec();
@@ -684,11 +682,12 @@ public class ManaUI : Regist
             () =>
             {
                 ManaAudio.PlayClip(Clip.CurrentClip);
-                ManaReso.Get("C_Group").TweenForCG();
 
                 ManaReso.Get("Da_Info").TweenBacCG();
                 ManaReso.Get("GardenMini").TweenBacVec();
                 ManaReso.Get("D_MiniGame").TweenBacCG();
+
+                ManaInfo.Show(Award.Info, 4f);
             }
         );
 
@@ -1050,11 +1049,9 @@ public class ManaUI : Regist
 
         tween.OnForwardStart += () =>
         {
-            ManaReso.Get("C_Group").TweenBacCG();
+            ManaReso.Get("C_Main").TweenBacCG();
 
             ManaReso.SetActive("F_Manage", true);
-
-            ManaData.MainDepth++;
         };
 
         tween.OnForwardFinish += () =>
@@ -1062,14 +1059,10 @@ public class ManaUI : Regist
             ManaReso.Get("F_Manage").TweenForGra();
         };
 
-        tween.OnBackwardStart += () =>
-        {
-            ManaData.MainDepth--;
-        };
-
         tween.OnBackwardFinish += () =>
         {
-            ManaReso.Get("C_Group").TweenForCG();
+            ManaReso.Get("C_Main").TweenForCG();
+            ManaReso.Get("C_Group").GetTweenCG().InOrigin = true;
 
             ManaReso.SetActive("F_Manage", false);
         };
@@ -1236,12 +1229,7 @@ public class ManaUI : Regist
         {
             ManaAudio.PlayClip(Clip.BubbleClip);
 
-            if (ManaData.MainDepth == -1) 
-            {
-                ManaReso.Get("C_Group").TweenBacCG();
-            }
-
-            ManaData.MainDepth++;
+            ManaReso.Get("C_Main").TweenBacCG();
 
             if (ManaGarden.MyFlowerSpec == 0)
             {
@@ -1251,14 +1239,18 @@ public class ManaUI : Regist
 
         tween.OnBackwardStart += () =>
         {
-            ManaData.MainDepth--;
-
             foreach (var kv in ManaGarden.FlowerInfoDic)
             {
                 kv.Value.UIPartical.Animator.SetTrigger("Stop");
             }
         };
 
+        tween.OnBackwardFinish += () =>
+        {
+            ManaReso.Get("C_Main").TweenForCG();
+            ManaReso.Get("C_Group").GetTweenCG().InOrigin = true;
+        };
+
         #endregion
 
         #region G_Special
@@ -1361,17 +1353,7 @@ public class ManaUI : Regist
 
         tween.OnForwardStart += () =>
         {
-            if (ManaData.MainDepth == -1)
-            {
-                ManaReso.Get("C_Group").TweenBacCG();
-            }
-
-            ManaData.MainDepth++;
-        };
-
-        tween.OnBackwardStart += () =>
-        {
-            ManaData.MainDepth--;
+            ManaReso.Get("C_Main").TweenBacCG();
         };
 
         #endregion
@@ -1381,7 +1363,13 @@ public class ManaUI : Regist
         #region I
 
         ManaReso.Get("I_BlackMask").CreateTweenCG(1, 0, 2.5f, true, false, Curve.EaseOutQuad);
-        
+
+        #endregion
+
+        #region J
+
+        ManaReso.Get("J_Info").CreateTweenCG(0, 0.9f, 0.25f, false, true, Curve.EaseOutQuad);
+
         #endregion
 
         #region K
@@ -1430,14 +1418,13 @@ public class ManaUI : Regist
 
         tween.OnForwardStart += () =>
         {
-            ManaReso.Get("C_Group").TweenBacCG();
-
-            ManaData.MainDepth++;
+            ManaReso.Get("C_Main").TweenBacCG();
         };
 
         tween.OnBackwardFinish += () =>
         {
-            ManaReso.Get("C_Group").TweenForCG();
+            ManaReso.Get("C_Main").TweenForCG();
+            ManaReso.Get("C_Group").GetTweenCG().InOrigin = true;
         };
 
         #endregion
@@ -1708,11 +1695,9 @@ public class ManaUI : Regist
 
         tween.OnForwardStart += () =>
         {
-            ManaReso.Get("C_Group").TweenBacCG();
+            ManaReso.Get("C_Main").TweenBacCG();
 
             ManaReso.SetActive("M_Achieve", true);
-
-            ManaData.MainDepth++;
         };
 
         tween.OnForwardFinish += () =>
@@ -1720,14 +1705,10 @@ public class ManaUI : Regist
             ManaReso.Get("M_Achieve").TweenForGra();
         };
 
-        tween.OnBackwardStart += () =>
-        {
-            ManaData.MainDepth--;
-        };
-
         tween.OnBackwardFinish += () =>
         {
-            ManaReso.Get("C_Group").TweenForCG();
+            ManaReso.Get("C_Main").TweenForCG();
+            ManaReso.Get("C_Group").GetTweenCG().InOrigin = true;
 
             ManaReso.SetActive("M_Achieve", false);
             ManaReso.SetActive("M_Achieve0", false);

+ 9 - 1
Assets/Script/Manage/ManaVisit.cs

@@ -423,6 +423,11 @@ public class ManaVisit
         ManaGarden.PageList = new List<Transform>();
 
 
+        Garden.Garden2.position = Garden.GardenPos2[0];
+        Garden.Garden3.position = Garden.GardenPos3[0];
+        Garden.Garden4.position = Garden.GardenPos4[0];
+        Garden.GardenPage.position = Garden.PagePos[0];
+
         for (int i = 0; i < Slot/7 + 2; i++)
         {
             ManaGarden.CreatePage();
@@ -473,7 +478,10 @@ public class ManaVisit
         
         if (Random.Range(0f,1f) <= AwardRate)
         {
-            ManaGarden.PlantList.Random().Flower.Award = true;
+            if (ManaGarden.PlantList.Count > 0)
+            {
+                ManaGarden.PlantList.Random().Flower.Award = true;
+            }
         }
 
         #endregion

+ 10 - 6
Assets/Script/Object/Skill/Ability.cs

@@ -357,10 +357,7 @@ public class Ability : SkillRoot
         {
             ItemStatus = SkillStatus.Upgrade;
 
-            if (!ManaTutorial.TutorialA)
-            {
-                ManaAudio.PlayClip(Clip.SkillClip);
-            }
+            ManaAudio.PlayClip(Clip.SkillClip);
 
             Level = 1;
 
@@ -497,9 +494,16 @@ public class Ability : SkillRoot
 
         ManaData.Pay(ID, UnlockAheadAmt, UnlockAheadCur, () =>
         {
-            ManaAudio.PlayClip(Clip.SkillClip);
+            if (UnlockCur == Current.Free)
+            {
+                Unlock();
+            }
+            else
+            {
+                ManaAudio.PlayClip(Clip.SkillClip);
 
-            ItemStatus = SkillStatus.UnLock;
+                ItemStatus = SkillStatus.UnLock;
+            }
         });
     }
 

+ 11 - 2
Assets/Script/Object/Skill/BigSkill.cs

@@ -438,6 +438,8 @@ public class BigSkill : Skill
 
             UseA();
             UseB();
+
+            ManaInfo.Show(String.Format("{0}{1}", Language.GetStr("UI", "J_Info1"), Language.GetStr("SkillName", ID)), 2f);
         });
     }
 
@@ -561,9 +563,16 @@ public class BigSkill : Skill
 
         ManaData.Pay(ID, UnlockAheadAmt, UnlockAheadCur, () =>
         {
-            ManaAudio.PlayClip(Clip.SkillClip);
+            if (UnlockCur == Current.Free)
+            {
+                Unlock();
+            }
+            else
+            {
+                ManaAudio.PlayClip(Clip.SkillClip);
 
-            ItemStatus = SkillStatus.UnLock;
+                ItemStatus = SkillStatus.UnLock;
+            }
         });
     }
 }

+ 36 - 0
Assets/Script/Object/Skill/Pack.cs

@@ -278,6 +278,42 @@ public class Pack : SkillRoot
         UseA();
         UseB();
 
+        StringBuilder sb = new StringBuilder();
+
+        if (!CoinOnce.Equal(0))
+        {
+            sb.AppendFormat("{0}{1}{2}    ", Language.GetStr("UI", "J_Info0"), "<(金币)>", CoinOnce);
+        }
+
+        if (!DiamondOnce.Equal(0))
+        {
+            sb.AppendFormat("{0}{1}{2}    ", Language.GetStr("UI", "J_Info0"), "<(钻石)>", DiamondOnce);
+        }
+
+        if (!string.IsNullOrEmpty(Flower))
+        {
+            string[] strings = Flower.Split(' ');
+
+            for (int i = 0; i < strings.Length; i++)
+            {
+                FlowerInfo flowerInfo = ManaGarden.FlowerInfoDic[int.Parse(strings[i])];
+
+                if (flowerInfo.Unlock == false)
+                {
+                    flowerInfo.Unlock = true;
+                }
+
+                sb.AppendFormat("{0}{1}{2}", Language.GetStr("UI", "J_Info0"), "<(花朵)>", flowerInfo.Name);
+            }
+        }
+
+        string str = sb.ToString();
+
+        if (!string.IsNullOrEmpty(str))
+        {
+            ManaInfo.Show(str, 2f);
+        }
+
         Level++;
 
         ManaAudio.PlayClip(Clip.SkillClip);

+ 27 - 4
Assets/Script/Object/Skill/Skill.cs

@@ -276,9 +276,30 @@ public class Skill : SkillRoot
 
     protected virtual void UseB()
     {
-        ManaData.Coin += NewCoinOnce;
-        ManaData.Coin += ManaData.CoinPerson * NewCoinOnceBuff;
+        float temp = NewCoinOnce + ManaData.CoinPerson*NewCoinOnceBuff;
+
+        ManaData.Coin += temp;
         ManaData.Diamond += DiamondOnce;
+
+
+        StringBuilder sb = new StringBuilder();
+
+        if (!temp.Equal(0))
+        {
+            sb.AppendFormat("{0}{1}{2}", Language.GetStr("UI", "J_Info0"), "<(金币)>", temp);
+        }
+
+        if (!DiamondOnce.Equal(0))
+        {
+            sb.AppendFormat("{0}{1}{2}", Language.GetStr("UI", "J_Info0"), "<(钻石)>", DiamondOnce);
+        }
+
+        string str = sb.ToString();
+
+        if (!string.IsNullOrEmpty(str))
+        {
+            ManaInfo.Show(sb.ToString(), 2f);
+        }
     }
 
 
@@ -306,6 +327,8 @@ public class Skill : SkillRoot
 
             UseA();
             UseB();
+
+            ManaInfo.Show(String.Format("{0}{1}", Language.GetStr("UI", "J_Info1"), Language.GetStr("SkillName", ID)), 2f);
         });
     }
 
@@ -583,8 +606,8 @@ public class Skill : SkillRoot
                 {
                     temp = NewCoinOnceBuff;
                     
-                    UpgradeValue(ref temp, CoinOnceBuff, UpgradeCoinOnce, offset);
-
+                    UpgradeValue(ref temp, UpgradeCoinOnce, offset);
+                    
                     stringBuilder.Append(temp.ToString("0"));
                 }
 

+ 2 - 2
Assets/Script/Object/Skill/SkillRoot.cs

@@ -316,11 +316,11 @@ public abstract class SkillRoot
         }
     }
 
-    protected void UpgradeValue(ref float target, string fml, int offet)
+    protected void UpgradeValue(ref float target, string fml, int offset)
     {
         if (fml.Contains("%"))
         {
-            target += (float.Parse(fml.Replace("%", ""))/100)*offet;
+            target += (float.Parse(fml.Replace("%", ""))/100)*offset;
         }
     }
 

+ 10 - 0
Assets/Script/Tool/Extension.cs

@@ -350,6 +350,16 @@ public static class Extension
 
     #region String
 
+    public static string Remove(this string str, int startIndex, int endIndex, bool empty)
+    {
+        if (startIndex > endIndex)
+        {
+            throw new Exception();
+        }
+
+        return str.Remove(startIndex, endIndex - startIndex + 1);
+    }
+
     public static string Replace(this string str, int startIndex, int endIndex, string newStr)
     {
         str = str.Remove(startIndex, endIndex - startIndex + 1);

+ 28 - 12
Assets/Script/Tool/UI/ImagePlus.cs

@@ -38,24 +38,40 @@ public class ImagePlus : Image
         {
             if (Application.isPlaying)
             {
-                sprite = Bundle.Atlas.LoadAsset<Sprite>("Atlas");
+                if (sprite == null)
+                {
+                    sprite = Bundle.Atlas.LoadAsset<Sprite>("Atlas");
+                }
             }
         }
 
         VerticesList = new List<UIVertex[]>();
 
-        for (int i = 0; i < vertexList.Count; i += 4)
+        if (vertexList.Valid())
         {
-            VerticesList.Add
-            (
-                new UIVertex[]
-                {
-                    vertexList[i + 0],
-                    vertexList[i + 1],
-                    vertexList[i + 2],
-                    vertexList[i + 3],
-                }
-            );
+            for (int i = 0; i < vertexList.Count; i += 4)
+            {
+                UIVertex v0 = vertexList[i + 0];
+                UIVertex v1 = vertexList[i + 1];
+                UIVertex v2 = vertexList[i + 2];
+                UIVertex v3 = vertexList[i + 3];
+
+                v0.color *= color;
+                v1.color *= color;
+                v2.color *= color;
+                v3.color *= color;
+
+                VerticesList.Add
+                (
+                    new UIVertex[]
+                    {
+                    v0,
+                    v1,
+                    v2,
+                    v3
+                    }
+                );
+            }
         }
 
         OnPopulateMesh(empty);

+ 66 - 14
Assets/Script/Tool/UI/TextPlus.cs

@@ -24,7 +24,7 @@ public class TextPlus : Text
             if (ImagePlus_ == null)
             {
                 ImagePlus_ = GetComponentInChildren<ImagePlus>();
-
+                
                 if (ImagePlus_ == null)
                 {
                     GameObject go = new GameObject("ImagePlus", typeof(ImagePlus));
@@ -186,7 +186,7 @@ public class TextPlus : Text
 
     protected void Initialize()
     {
-        LineHeight = preferredHeight / cachedTextGenerator.lineCount;
+        LineHeight = cachedTextGenerator.lines[0].height*0.65f;
 
         ImageIndex = new List<int>();
         RemovePos = new List<int>();
@@ -264,17 +264,25 @@ public class TextPlus : Text
 
         for (int i = 0; i < ImageIndex.Count; i++)
         {
+            bool recycle = false;
+
             for (int j = 0; j < endIndex.Count; j++)
             {
                 if (ImageIndex[i] < endIndex[j])
                 {
                     imageGroup[j].Add(ImageIndex[i]);
 
-                    i++;
-                    j = 0;
+                    recycle = true;
+
+                    break;
                 }
             }
 
+            if (recycle)
+            {
+                continue;
+            }
+
             imageGroup.Last(0).Add(ImageIndex[i]);
         }
 
@@ -288,14 +296,43 @@ public class TextPlus : Text
 
         if (alignment == TextAnchor.LowerCenter || alignment == TextAnchor.MiddleCenter || alignment == TextAnchor.UpperCenter)
         {
-            //for (int i = 0; i < UPPER; i++)
-            //{
-                
-            //}
+            for (int i = 0; i < startIndex.Count; i++)
+            {
+                if (i == startIndex.Count - 1)
+                {
+                    offset = -GetWidth(startIndex[i], newText.Length - 1)/2;
+
+                    offset -= NewTextPos[0 + startIndex[i] * 6].x;
+
+                    Move(startIndex[i], newText.Length - 1, offset, 0);
+                }
+                else
+                {
+                    offset = -GetWidth(startIndex[i], endIndex[i]-1)/2;
+                    
+                    offset -= NewTextPos[0 + startIndex[i]*6].x;
+
+                    Move(startIndex[i], endIndex[i]-1, offset, 0);
+                }
+            }
         }
         else if (alignment == TextAnchor.LowerRight || alignment == TextAnchor.MiddleRight || alignment == TextAnchor.UpperRight)
         {
+            for (int i = 0; i < startIndex.Count; i++)
+            {
+                if (i == startIndex.Count - 1)
+                {
+                    offset = cachedTextGenerator.rectExtents.xMax / 2 - NewTextPos[1 + (newText.Length - 1) * 6].x;
 
+                    Move(startIndex[i], newText.Length - 1, offset, 0);
+                }
+                else
+                {
+                    offset = cachedTextGenerator.rectExtents.xMax/2 - NewTextPos[1 + (endIndex[i] - 1)*6].x;
+
+                    Move(startIndex[i], endIndex[i] - 1, offset, 0);
+                }
+            }
         }
         else if (alignment == TextAnchor.LowerLeft || alignment == TextAnchor.MiddleLeft || alignment == TextAnchor.UpperLeft)
         {
@@ -305,15 +342,15 @@ public class TextPlus : Text
 
         if (alignment == TextAnchor.LowerCenter || alignment == TextAnchor.LowerLeft || alignment == TextAnchor.LowerRight)
         {
-
+            
         }
         else if (alignment == TextAnchor.MiddleCenter || alignment == TextAnchor.MiddleLeft || alignment == TextAnchor.MiddleRight)
         {
-
+            
         }
         else if (alignment == TextAnchor.UpperCenter || alignment == TextAnchor.UpperLeft || alignment == TextAnchor.UpperRight)
         {
-
+            
         }
     }
 
@@ -331,13 +368,13 @@ public class TextPlus : Text
         {
             rear = endIndex - 1;
             front = imageIndex[0] + 1;
-
+            
             if (endIndex == -1)
             {
                 rear = NewTextIndex.Count - 1;
             }
 
-            if (rear <= front)
+            if (rear < front)
             {
                 return;
             }
@@ -414,7 +451,7 @@ public class TextPlus : Text
         {
             first = true;
         }
-        else if (!SameLine(imageInfo.Left, imageInfo.Right))
+        else if (!SameLine(imageInfo.Left-1, imageInfo.Left))
         {
             first = true;
         }
@@ -474,6 +511,11 @@ public class TextPlus : Text
 
     protected bool SameLine(int index1, int index2)
     {
+        //if (text[index1] == '\n' || text[index2] == '\n')
+        //{
+        //    return false;
+        //}
+
         if (Mathf.Abs(GetCenter(index1).y - GetCenter(index2).y) < LineHeight/4)
         {
             return true;
@@ -490,6 +532,16 @@ public class TextPlus : Text
         return (NewTextPos[0 + index2*6].x - NewTextPos[1 + index1*6].x);
     }
 
+    protected float GetWidth(int index1, int index2)
+    {
+        return (NewTextPos[1 + index2 * 6].x - NewTextPos[0 + index1 * 6].x);
+    }
+
+    protected float GetHeight(int index1, int index2)
+    {
+        return (NewTextPos[0 + index1 * 6].y - NewTextPos[2 + index2 * 6].y);
+    }
+
     protected Vector3 GetCenter(int index)
     {
         return (TextVertex[0 + index*6].position + TextVertex[3 + index*6].position)/2;

+ 1 - 0
MyLovelyGarden.csproj

@@ -185,6 +185,7 @@
     <Compile Include="Assets\Script\Manage\ManaDebug.cs" />
     <Compile Include="Assets\Script\Manage\ManaGarden.cs" />
     <Compile Include="Assets\Script\Manage\ManaIAP.cs" />
+    <Compile Include="Assets\Script\Manage\ManaInfo.cs" />
     <Compile Include="Assets\Script\Manage\ManaLan.cs" />
     <Compile Include="Assets\Script\Manage\ManaMiniGame.cs" />
     <Compile Include="Assets\Script\Manage\ManaPlayer.cs" />

+ 1 - 12
ToList.txt

@@ -1,23 +1,12 @@
-编存档
+编存档 下载随机存档失败时就编一个存档
 
 分享图片是否报错
 
-连续访问时Slot从第二页到第一页有个Bug
-
-没种花的时候不能有奖励
-
 发布前把服务器中的存档清理一次
 
-下载随机存档失败的情况
-
-
-图文混排(显示多个图片 缩进后能自动换行)
-
 Anchor Encrypt 带宽优化 Preload(Atlas)
 
 
-教程中解锁花园没有声音
-
 Hud能往左右上下走,设置自己的颜色 设置Outline的颜色 设置速度
 
 返回时有存蝴蝶、花的Bug