LiuQilin 8 年之前
父节点
当前提交
ff37bc6863
共有 55 个文件被更改,包括 1190 次插入1325 次删除
  1. 二进制
      .vs/MyLovelyGarden/v14/.suo
  2. 二进制
      Assets/Resources/Garden.unity
  3. 二进制
      Assets/Resources/Prefab/Object/Flower.prefab
  4. 二进制
      Assets/Resources/Prefab/PrefabUI/AwardBk.prefab
  5. 0 8
      Assets/Resources/Prefab/PrefabUI/AwardBk.prefab.meta
  6. 二进制
      Assets/Resources/Prefab/PrefabUI/B_DateItem.prefab
  7. 0 8
      Assets/Resources/Prefab/PrefabUI/B_DateItem.prefab.meta
  8. 二进制
      Assets/Resources/Prefab/PrefabUI/Canvas.prefab
  9. 二进制
      Assets/Resources/Prefab/PrefabUI/Da_AwardItem.prefab
  10. 0 8
      Assets/Resources/Prefab/PrefabUI/Da_AwardItem.prefab.meta
  11. 二进制
      Assets/Resources/Prefab/PrefabUI/Fa_GardenItem.prefab
  12. 0 8
      Assets/Resources/Prefab/PrefabUI/Fa_GardenItem.prefab.meta
  13. 二进制
      Assets/Resources/Prefab/PrefabUI/Fb_MagicItem.prefab
  14. 0 8
      Assets/Resources/Prefab/PrefabUI/Fb_MagicItem.prefab.meta
  15. 二进制
      Assets/Resources/Prefab/PrefabUI/Fc_StoreItem.prefab
  16. 0 8
      Assets/Resources/Prefab/PrefabUI/Fc_StoreItem.prefab.meta
  17. 二进制
      Assets/Resources/Prefab/PrefabUI/Fd_ElfItem.prefab
  18. 0 8
      Assets/Resources/Prefab/PrefabUI/Fd_ElfItem.prefab.meta
  19. 二进制
      Assets/Resources/Prefab/PrefabUI/G_FlowerItem.prefab
  20. 0 8
      Assets/Resources/Prefab/PrefabUI/G_FlowerItem.prefab.meta
  21. 二进制
      Assets/Resources/Prefab/PrefabUI/H_FlowerItem.prefab
  22. 0 8
      Assets/Resources/Prefab/PrefabUI/H_FlowerItem.prefab.meta
  23. 2 2
      Assets/Resources/Sprite/SpriteUI/领取按钮.png.meta
  24. 0 9
      Assets/Resources/Temp.meta
  25. 5 5
      Assets/Resources/XML/Config/PlayerConfig.xml
  26. 402 99
      Assets/Script/Manage/ManaAnim.cs
  27. 26 73
      Assets/Script/Manage/ManaData.cs
  28. 10 38
      Assets/Script/Manage/ManaGarden.cs
  29. 59 63
      Assets/Script/Manage/ManaMiniGame.cs
  30. 1 1
      Assets/Script/Manage/ManaPlayer.cs
  31. 173 181
      Assets/Script/Manage/ManaReso.cs
  32. 48 82
      Assets/Script/Manage/ManaUI.cs
  33. 46 43
      Assets/Script/Object/Flower.cs
  34. 48 38
      Assets/Script/Object/Garden.cs
  35. 19 16
      Assets/Script/Object/Hud/HudText.cs
  36. 22 22
      Assets/Script/Object/Skill/Ability.cs
  37. 49 49
      Assets/Script/Object/Skill/BigSkill.cs
  38. 14 14
      Assets/Script/Object/Skill/Pack.cs
  39. 49 49
      Assets/Script/Object/Skill/Skill.cs
  40. 1 1
      Assets/Script/Object/Skill/SkillRoot.cs
  41. 3 64
      Assets/Script/Tool/Anim/Move.cs
  42. 2 2
      Assets/Script/Tool/Anim/Move.cs.meta
  43. 4 2
      Assets/Script/Tool/Anim/Tween.cs
  44. 2 2
      Assets/Script/Tool/Anim/TweenCG.cs
  45. 0 97
      Assets/Script/Tool/Anim/TweenGraphic.cs
  46. 0 12
      Assets/Script/Tool/Anim/TweenGraphic.cs.meta
  47. 0 122
      Assets/Script/Tool/Anim/TweenVector.cs
  48. 0 12
      Assets/Script/Tool/Anim/TweenVector.cs.meta
  49. 19 5
      Assets/Script/Tool/Auxiliary.cs
  50. 9 9
      Assets/Script/Tool/Data.cs
  51. 121 38
      Assets/Script/Tool/Extension.cs
  52. 22 82
      Assets/Script/Tool/UI/FlowerCard.cs
  53. 10 2
      MyLovelyGarden.csproj
  54. 13 16
      MyLovelyGarden.sln
  55. 11 3
      MyLovelyGarden.txt

二进制
.vs/MyLovelyGarden/v14/.suo


二进制
Assets/Resources/Garden.unity


二进制
Assets/Resources/Prefab/Object/Flower.prefab


二进制
Assets/Resources/Prefab/PrefabUI/AwardBk.prefab


+ 0 - 8
Assets/Resources/Prefab/PrefabUI/AwardBk.prefab.meta

@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: f9aa104f07217274b960944fc4a2f4b9
-timeCreated: 1486778794
-licenseType: Pro
-NativeFormatImporter:
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

二进制
Assets/Resources/Prefab/PrefabUI/B_DateItem.prefab


+ 0 - 8
Assets/Resources/Prefab/PrefabUI/B_DateItem.prefab.meta

@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: caf225b73aaaad040a8d265a9015d560
-timeCreated: 1489031719
-licenseType: Pro
-NativeFormatImporter:
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

二进制
Assets/Resources/Prefab/PrefabUI/Canvas.prefab


二进制
Assets/Resources/Prefab/PrefabUI/Da_AwardItem.prefab


+ 0 - 8
Assets/Resources/Prefab/PrefabUI/Da_AwardItem.prefab.meta

@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: a30b5e18211fec049a50f5926207003f
-timeCreated: 1487125601
-licenseType: Pro
-NativeFormatImporter:
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

二进制
Assets/Resources/Prefab/PrefabUI/Fa_GardenItem.prefab


+ 0 - 8
Assets/Resources/Prefab/PrefabUI/Fa_GardenItem.prefab.meta

@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: 8cc682d14bfe4704db78616f3bedfca1
-timeCreated: 1487742743
-licenseType: Pro
-NativeFormatImporter:
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

二进制
Assets/Resources/Prefab/PrefabUI/Fb_MagicItem.prefab


+ 0 - 8
Assets/Resources/Prefab/PrefabUI/Fb_MagicItem.prefab.meta

@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: 3d886a757a184a4408a4b2232d3f11c8
-timeCreated: 1487742478
-licenseType: Pro
-NativeFormatImporter:
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

二进制
Assets/Resources/Prefab/PrefabUI/Fc_StoreItem.prefab


+ 0 - 8
Assets/Resources/Prefab/PrefabUI/Fc_StoreItem.prefab.meta

@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: cd1b9672f5c8fa8458cfa2988d1a2bdc
-timeCreated: 1487742636
-licenseType: Pro
-NativeFormatImporter:
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

二进制
Assets/Resources/Prefab/PrefabUI/Fd_ElfItem.prefab


+ 0 - 8
Assets/Resources/Prefab/PrefabUI/Fd_ElfItem.prefab.meta

@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: 6c78f50ff5e79c04d8a65d50c88b2c67
-timeCreated: 1487742686
-licenseType: Pro
-NativeFormatImporter:
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

二进制
Assets/Resources/Prefab/PrefabUI/G_FlowerItem.prefab


+ 0 - 8
Assets/Resources/Prefab/PrefabUI/G_FlowerItem.prefab.meta

@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: 2b1653a1ec67be241ab4cdebe6184709
-timeCreated: 1487060412
-licenseType: Pro
-NativeFormatImporter:
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

二进制
Assets/Resources/Prefab/PrefabUI/H_FlowerItem.prefab


+ 0 - 8
Assets/Resources/Prefab/PrefabUI/H_FlowerItem.prefab.meta

@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: 3b578f911bb7dab4f8afefc585dcf17b
-timeCreated: 1489550438
-licenseType: Pro
-NativeFormatImporter:
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 2 - 2
Assets/Resources/Sprite/SpriteUI/领取按钮.png.meta

@@ -1,6 +1,6 @@
 fileFormatVersion: 2
 guid: d190acd69d12a114c851133dbcb7c5f7
-timeCreated: 1489460413
+timeCreated: 1489651045
 licenseType: Pro
 TextureImporter:
   fileIDToRecycleName: {}
@@ -39,7 +39,7 @@ TextureImporter:
   spriteMeshType: 1
   alignment: 0
   spritePivot: {x: 0.5, y: 0.5}
-  spriteBorder: {x: 70, y: 65, z: 70, w: 65}
+  spriteBorder: {x: 70, y: 0, z: 70, w: 0}
   spritePixelsToUnits: 100
   alphaUsage: 1
   alphaIsTransparency: 1

+ 0 - 9
Assets/Resources/Temp.meta

@@ -1,9 +0,0 @@
-fileFormatVersion: 2
-guid: 0dcf62c8561c02f479195703efe90da2
-folderAsset: yes
-timeCreated: 1486173350
-licenseType: Pro
-DefaultImporter:
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 5 - 5
Assets/Resources/XML/Config/PlayerConfig.xml

@@ -1,11 +1,11 @@
 <PlayerConfig>
-  <Coin value="57" />
+  <Coin value="0" />
   <Level value="0" />
   <Person value="1" />
   <Diamond value="0" />
-  <QuitTime value="3/15/2017 4:12:40 PM" />
+  <QuitTime value="3/17/2017 3:30:22 AM" />
   <CoinPerson value="1" />
-  <CircleTimer value="10" />
+  <CircleTimer value="0" />
   <PlantList FlowerTraA1="1" FlowerTraA2="2" FlowerTraA3="3" FlowerTraA4="4" FlowerTraA5="5" FlowerTraA6="6" FlowerTraA7="7" FlowerTraA8="8" FlowerTraA9="9" />
   <FlowerList ID="1 2 3 4 5 6 7 8 9" />
   <SkillList>
@@ -37,9 +37,9 @@
     <礼包 SkillCato="Pack" Name="钻石2000 赠送500" ItemStatus="Buy" Level="0" />
     <滴哩哩的小黄鹂 SkillCato="Ability" ItemStatus="Upgrade" Level="0" />
     <蓝色小蝴蝶 SkillCato="Ability" ItemStatus="Lock" Level="0" />
-    <礼包 SkillCato="Pack" Name="钻石6000 赠送600" ItemStatus="Buy" Level="0" />
+    <礼包 SkillCato="Pack" Name="钻石6000 赠送600" ItemStatus="Lock" Level="0" />
     <红色小蝴蝶 SkillCato="Ability" ItemStatus="Lock" Level="0" />
-    <礼包 SkillCato="Pack" Name="钻石10000 赠送2000" ItemStatus="Buy" Level="0" />
+    <礼包 SkillCato="Pack" Name="钻石10000 赠送2000" ItemStatus="Lock" Level="0" />
     <白色小蝴蝶 SkillCato="Ability" ItemStatus="Lock" Level="0" />
   </SkillList>
 </PlayerConfig>

+ 402 - 99
Assets/Script/Manage/ManaAnim.cs

@@ -12,13 +12,6 @@ public enum Curve
     EaseOutQuad,
 }
 
-public enum TweenType
-{
-    CG,
-    Vector,
-    Graphic,
-}
-
 public delegate float CurveFunctionF(float timer, float duration, float start, float delta);
 
 public delegate Color CurveFunctionC(float timer, float duration, Color start, Color delta);
@@ -30,17 +23,20 @@ public class ManaAnim : MonoBehaviour
     #region 变量
 
     public static List<Move> MoveList;
-    public static List<Tween> ForwardList;
-    public static List<Tween> BackwardList;
+    public static List<Tween> TweenForList;
+    public static List<Tween> TweenBacList;
 
     public static Dictionary<Curve, CurveFunctionF> FunctionDicF;
     public static Dictionary<Curve, CurveFunctionC> FunctionDicC;
     public static Dictionary<Curve, CurveFunctionV> FunctionDicV;
 
-    private static Dictionary<Transform, Move> MoveDic;
-    private static Dictionary<Transform, Tween> TweenCgDic;
-    private static Dictionary<Transform, Tween> TweenVectorDic;
-    private static Dictionary<Transform, Tween> TweenGraphicDic;
+    private static Dictionary<Transform, MoveVec> MoveVecDic;
+    private static Dictionary<Transform, MoveScrr> MoveScrrDic;
+
+    private static Dictionary<Transform, TweenCG> TweenCgDic;
+    private static Dictionary<Transform, TweenVec> TweenVecDic;
+    private static Dictionary<Transform, TweenGra> TweenGraDic;
+    private static Dictionary<Transform, TweenScale> TweenScaleDic;
 
     #endregion
 
@@ -59,17 +55,17 @@ public class ManaAnim : MonoBehaviour
             }
         }
 
-        for (int i = 0; i < ForwardList.Count; i++)
+        for (int i = 0; i < TweenForList.Count; i++)
         {
-            if (ForwardList[i].DoForward())
+            if (TweenForList[i].DoForward())
             {
                 i--;
             }
         }
 
-        for (int i = 0; i < BackwardList.Count; i++)
+        for (int i = 0; i < TweenBacList.Count; i++)
         {
-            if (BackwardList[i].DoBackward())
+            if (TweenBacList[i].DoBackward())
             {
                 i--;
             }
@@ -80,17 +76,20 @@ public class ManaAnim : MonoBehaviour
     private void RegistValue()
     {
         MoveList = new List<Move>();
-        ForwardList = new List<Tween>();
-        BackwardList = new List<Tween>();
+        TweenForList = new List<Tween>();
+        TweenBacList = new List<Tween>();
 
         FunctionDicF = new Dictionary<Curve, CurveFunctionF>();
         FunctionDicC = new Dictionary<Curve, CurveFunctionC>();
         FunctionDicV = new Dictionary<Curve, CurveFunctionV>();
 
-        MoveDic = new Dictionary<Transform, Move>();
-        TweenCgDic = new Dictionary<Transform, Tween>();
-        TweenVectorDic = new Dictionary<Transform, Tween>();
-        TweenGraphicDic = new Dictionary<Transform, Tween>();
+        MoveVecDic = new Dictionary<Transform, MoveVec>();
+        MoveScrrDic = new Dictionary<Transform, MoveScrr>();
+
+        TweenCgDic = new Dictionary<Transform, TweenCG>();
+        TweenVecDic = new Dictionary<Transform, TweenVec>();
+        TweenGraDic = new Dictionary<Transform, TweenGra>();
+        TweenScaleDic = new Dictionary<Transform, TweenScale>();
 
         FunctionDicF.Add(Curve.Linear, Linear);
         FunctionDicF.Add(Curve.EaseOutQuad, EaseOutQuad);
@@ -103,11 +102,24 @@ public class ManaAnim : MonoBehaviour
     }
 
 
+    #region 动画函数
+
     public static float Linear(float timer, float duration, float start, float delta)
     {
         return delta*timer/duration + start;
     }
 
+    public static Color Linear(float timer, float duration, Color start, Color delta)
+    {
+        return new Color(Linear(timer, duration, start.r, delta.r), Linear(timer, duration, start.g, delta.g), Linear(timer, duration, start.b, delta.b), Linear(timer, duration, start.a, delta.a));
+    }
+
+    public static Vector3 Linear(float timer, float duration, Vector3 start, Vector3 delta)
+    {
+        return new Vector3(Linear(timer, duration, start.x, delta.x), Linear(timer, duration, start.y, delta.y), Linear(timer, duration, start.z, delta.z));
+    }
+
+
     public static float EaseOutQuad(float timer, float duration, float start, float delta)
     {
         timer /= duration;
@@ -115,110 +127,208 @@ public class ManaAnim : MonoBehaviour
         return -delta*timer*(timer - 2) + start;
     }
 
-    public static Color Linear(float timer, float duration, Color start, Color delta)
+    public static Color EaseOutQuad(float timer, float duration, Color start, Color delta)
     {
-        return new Color(Linear(timer, duration, start.r, delta.r), Linear(timer, duration, start.g, delta.g), Linear(timer, duration, start.b, delta.b), Linear(timer, duration, start.a, delta.a));
+        return new Color(EaseOutQuad(timer, duration, start.r, delta.r), EaseOutQuad(timer, duration, start.g, delta.g), EaseOutQuad(timer, duration, start.b, delta.b), EaseOutQuad(timer, duration, start.a, delta.a));
     }
 
-    public static Color EaseOutQuad(float timer, float duration, Color start, Color delta)
+    public static Vector3 EaseOutQuad(float timer, float duration, Vector3 start, Vector3 delta)
     {
-        return new Color(EaseOutQuad(timer, duration, start.r, delta.r), EaseOutQuad(timer, duration, start.g, delta.g), EaseOutQuad(timer, duration, start.b, delta.b), EaseOutQuad(timer, duration, start.a, delta.a));
+        return new Vector3(EaseOutQuad(timer, duration, start.x, delta.x), EaseOutQuad(timer, duration, start.y, delta.y), EaseOutQuad(timer, duration, start.z, delta.z));
     }
 
-    public static Vector3 Linear(float timer, float duration, Vector3 start, Vector3 delta)
+    #endregion
+
+
+    #region 播放动画
+
+    public static void MoveVec(Transform target, Vector3 destination, float duration, Curve curve)
     {
-        return new Vector3(Linear(timer, duration, start.x, delta.x), Linear(timer, duration, start.y, delta.y), Linear(timer, duration, start.z, delta.z));
+        MoveVec moveVec;
+
+        if (MoveVecDic.TryGetValue(target, out moveVec))
+        {
+            moveVec.StartMove(destination, duration, curve);
+        }
+        else
+        {
+            moveVec = CreateMoveVec(target);
+
+            moveVec.StartMove(destination, duration, curve);
+        }
     }
 
-    public static Vector3 EaseOutQuad(float timer, float duration, Vector3 start, Vector3 delta)
+    public static void MoveScrr(Transform target, float destination, float duration, Curve curve)
     {
-        return new Vector3(EaseOutQuad(timer, duration, start.x, delta.x), EaseOutQuad(timer, duration, start.y, delta.y), EaseOutQuad(timer, duration, start.z, delta.z));
+        MoveScrr moveScrr;
+
+        if (MoveScrrDic.TryGetValue(target, out moveScrr))
+        {
+            moveScrr.StartMove(destination, duration, curve);
+        }
+        else
+        {
+            moveScrr = CreateMoveScrr(target);
+
+            moveScrr.StartMove(destination, duration, curve);
+        }
     }
 
 
-    public static void Move(Transform target, Vector3 destination, float duration, Curve curve)
+    public static void TweenForCG(Transform target)
     {
-        Move move;
+        TweenCG tweenCG;
 
-        if (MoveDic.TryGetValue(target, out move))
+        if (TweenCgDic.TryGetValue(target, out tweenCG))
         {
-            move.StartMove(destination, duration, curve);
+            tweenCG.StartForward();
         }
         else
         {
-            move = CreateMove(target);
+            throw new Exception();
+        }
+    }
+
+    public static void TweenForVec(Transform target)
+    {
+        TweenVec tweenVec;
 
-            move.StartMove(destination, duration, curve);
+        if (TweenVecDic.TryGetValue(target, out tweenVec))
+        {
+            tweenVec.StartForward();
+        }
+        else
+        {
+            throw new Exception();
         }
     }
 
-    public static void Forward(Transform target, TweenType tweenType)
+    public static void TweenForGra(Transform target)
     {
-        Tween tween;
+        TweenGra tweenGra;
 
-        if (tweenType == TweenType.CG)
+        if (TweenGraDic.TryGetValue(target, out tweenGra))
         {
-            tween = TweenCgDic[target];
+            tweenGra.StartForward();
         }
-        else if (tweenType == TweenType.Vector)
+        else
         {
-            tween = TweenVectorDic[target];
+            throw new Exception();
         }
-        else if (tweenType == TweenType.Graphic)
+    }
+
+    public static void TweenForScale(Transform target)
+    {
+        TweenScale tweenScale;
+
+        if (TweenScaleDic.TryGetValue(target, out tweenScale))
         {
-            tween = TweenGraphicDic[target];
+            tweenScale.StartForward();
         }
         else
         {
             throw new Exception();
         }
+    }
+
+
+    public static void TweenBacCG(Transform target)
+    {
+        TweenCG tweenCG;
 
-        tween.StartForward();
+        if (TweenCgDic.TryGetValue(target, out tweenCG))
+        {
+            tweenCG.StartBackward();
+        }
+        else
+        {
+            throw new Exception();
+        }
     }
 
-    public static void Backward(Transform target, TweenType tweenType)
+    public static void TweenBacVec(Transform target)
     {
-        Tween tween;
+        TweenVec tweenVec;
 
-        if (tweenType == TweenType.CG)
+        if (TweenVecDic.TryGetValue(target, out tweenVec))
         {
-            tween = TweenCgDic[target];
+            tweenVec.StartBackward();
         }
-        else if (tweenType == TweenType.Vector)
+        else
         {
-            tween = TweenVectorDic[target];
+            throw new Exception();
         }
-        else if (tweenType == TweenType.Graphic)
+    }
+
+    public static void TweenBacGra(Transform target)
+    {
+        TweenGra tweenGra;
+
+        if (TweenGraDic.TryGetValue(target, out tweenGra))
         {
-            tween = TweenGraphicDic[target];
+            tweenGra.StartBackward();
         }
         else
         {
             throw new Exception();
         }
+    }
+
+    public static void TweenBacScale(Transform target)
+    {
+        TweenScale tweenScale;
 
-        tween.StartBackward();
+        if (TweenScaleDic.TryGetValue(target, out tweenScale))
+        {
+            tweenScale.StartBackward();
+        }
+        else
+        {
+            throw new Exception();
+        }
     }
 
+    #endregion
+
 
-    public static Move GetMove(Transform target)
+    #region 得到动画
+
+    public static MoveVec GetMoveVec(Transform target)
     {
-        return MoveDic[target];
+        MoveVec moveVec;
+
+        if (MoveVecDic.TryGetValue(target, out moveVec))
+        {
+            return moveVec;
+        }
+        else
+        {
+            throw new Exception();
+        }
     }
 
-    public static Tween GetTween(Transform target, TweenType tweenType)
+    public static MoveScrr GetMoveScrr(Transform target)
     {
-        if (tweenType == TweenType.Vector)
+        MoveScrr moveScrr;
+
+        if (MoveScrrDic.TryGetValue(target, out moveScrr))
         {
-            return TweenVectorDic[target];
+            return moveScrr;
         }
-        else if (tweenType == TweenType.CG)
+        else
         {
-            return TweenCgDic[target];
+            throw new Exception();
         }
-        else if (tweenType == TweenType.Graphic)
+    }
+
+
+    public static TweenCG GetTweenCG(Transform target)
+    {
+        TweenCG tweenCG;
+
+        if (TweenCgDic.TryGetValue(target, out tweenCG))
         {
-            return TweenGraphicDic[target];
+            return tweenCG;
         }
         else
         {
@@ -226,80 +336,273 @@ public class ManaAnim : MonoBehaviour
         }
     }
 
+    public static TweenVec GetTweenVec(Transform target)
+    {
+        TweenVec tweenVec;
+
+        if (TweenVecDic.TryGetValue(target, out tweenVec))
+        {
+            return tweenVec;
+        }
+        else
+        {
+            throw new Exception();
+        }
+    }
 
-    public static Move CreateMove(Transform target)
+    public static TweenGra GetTweenGra(Transform target)
     {
-        Move move = new Move(target);
-        
-        MoveDic.Add(target, move);
+        TweenGra tweenGra;
 
-        return move;
+        if (TweenGraDic.TryGetValue(target, out tweenGra))
+        {
+            return tweenGra;
+        }
+        else
+        {
+            throw new Exception();
+        }
     }
 
-    public static Tween CreateTween(Transform target, float origin, float destination,  float duration, bool originActive, bool destActive, Curve curve)
+    public static TweenScale GetTweenScale(Transform target)
     {
-        CanvasGroup cg = target.GetComponent<CanvasGroup>();
+        TweenScale tweenScale;
 
-        TweenCG tween = new TweenCG(cg, origin, destination, duration, originActive, destActive, curve);
+        if (TweenScaleDic.TryGetValue(target, out tweenScale))
+        {
+            return tweenScale;
+        }
+        else
+        {
+            throw new Exception();
+        }
+    }
 
-        TweenCgDic.Add(target, tween);
+    #endregion
 
-        return tween;
+
+    #region 创建动画
+
+    public static MoveVec CreateMoveVec(Transform target)
+    {
+        if (MoveVecDic.ContainsKey(target))
+        {
+            MoveVec moveVec = MoveVecDic[target];
+
+            moveVec = new MoveVec(target);
+
+            return moveVec;
+        }
+        else
+        {
+            MoveVec moveVec = new MoveVec(target);
+
+            MoveVecDic.Add(target, moveVec);
+
+            return moveVec;
+        }
     }
 
-    public static Tween CreateTween(Transform target, float destination, float duration, bool originActive, bool destActive, Curve curve)
+    public static MoveScrr CreateMoveScrr(Transform target)
     {
-        CanvasGroup cg = target.GetComponent<CanvasGroup>();
+        if (MoveScrrDic.ContainsKey(target))
+        {
+            MoveScrr moveScrr = MoveScrrDic[target];
+
+            moveScrr = new MoveScrr(target.GetComponent<ScrollRect>());
 
-        TweenCG tween = new TweenCG(cg, cg.alpha, destination, duration, originActive, destActive, curve);
+            return moveScrr;
+        }
+        else
+        {
+            MoveScrr moveScrr = new MoveScrr(target.GetComponent<ScrollRect>());
 
-        TweenCgDic.Add(target, tween);
+            MoveScrrDic.Add(target, moveScrr);
 
-        return tween;
+            return moveScrr;
+        }
     }
 
-    public static Tween CreateTween(Transform target, Color origin, Color destination, float duration, bool originActive, bool destActive, Curve curve)
+    public static TweenCG CreateTweenCG(Transform target, float origin, float destination,  float duration, bool originActive, bool destActive, Curve curve)
     {
-        Graphic graphic = target.GetComponent<Graphic>();
+        if (TweenCgDic.ContainsKey(target))
+        {
+            CanvasGroup cg = target.GetComponent<CanvasGroup>();
+
+            TweenCG tween = TweenCgDic[target];
+
+            tween = new TweenCG(cg, origin, destination, duration, originActive, destActive, curve);
+
+            return tween;
+        }
+        else
+        {
+            CanvasGroup cg = target.GetComponent<CanvasGroup>();
 
-        TweenGraphic tween = new TweenGraphic(graphic, origin, destination, duration, originActive, destActive, curve);
+            TweenCG tween = new TweenCG(cg, origin, destination, duration, originActive, destActive, curve);
 
-        TweenGraphicDic.Add(target, tween);
+            TweenCgDic.Add(target, tween);
 
-        return tween;
+            return tween;
+        }
     }
 
-    public static Tween CreateTween(Transform target, Color destination, float duration, bool originActive, bool destActive, Curve curve)
+    public static TweenCG CreateTweenCG(Transform target, float destination, float duration, bool originActive, bool destActive, Curve curve)
     {
-        Graphic graphic = target.GetComponent<Graphic>();
+        if (TweenCgDic.ContainsKey(target))
+        {
+            CanvasGroup cg = target.GetComponent<CanvasGroup>();
+
+            TweenCG tween = TweenCgDic[target];
+
+            tween = new TweenCG(cg, cg.alpha, destination, duration, originActive, destActive, curve);
 
-        TweenGraphic tween = new TweenGraphic(graphic, graphic.color, destination, duration, originActive, destActive, curve);
+            return tween;
+        }
+        else
+        {
+            CanvasGroup cg = target.GetComponent<CanvasGroup>();
 
-        TweenGraphicDic.Add(target, tween);
+            TweenCG tween = new TweenCG(cg, cg.alpha, destination, duration, originActive, destActive, curve);
 
-        return tween;
+            TweenCgDic.Add(target, tween);
+
+            return tween;
+        }
     }
 
-    public static Tween CreateTween(Transform target, Vector3 origin, Vector3 destination, float duration, bool originActive, bool destActive, Curve curve)
+    public static TweenVec CreateTweenVec(Transform target, Vector3 origin, Vector3 destination, float duration, bool originActive, bool destActive, Curve curve)
     {
         origin.z = target.position.z;
         destination.z = target.position.z;
-        
-        TweenVector tween = new TweenVector(target, origin, destination, duration, originActive, destActive, curve);
 
-        TweenVectorDic.Add(target, tween);
+        if (TweenVecDic.ContainsKey(target))
+        {
+            TweenVec tween = TweenVecDic[target];
+
+            tween = new TweenVec(target, origin, destination, duration, originActive, destActive, curve);
+
+            return tween;
+        }
+        else
+        {
+            TweenVec tween = new TweenVec(target, origin, destination, duration, originActive, destActive, curve);
+
+            TweenVecDic.Add(target, tween);
 
-        return tween;
+            return tween;
+        }
     }
 
-    public static Tween CreateTween(Transform target, Vector3 destination, float duration, bool originActive, bool destActive, Curve curve)
+    public static TweenVec CreateTweenVec(Transform target, Vector3 destination, float duration, bool originActive, bool destActive, Curve curve)
     {
         destination.z = target.position.z;
 
-        TweenVector tween = new TweenVector(target, target.position, destination, duration, originActive, destActive, curve);
-        
-        TweenVectorDic.Add(target, tween);
+        if (TweenVecDic.ContainsKey(target))
+        {
+            TweenVec tween = TweenVecDic[target];
+
+            tween = new TweenVec(target, target.position, destination, duration, originActive, destActive, curve);
+
+            return tween;
+        }
+        else
+        {
+            TweenVec tween = new TweenVec(target, target.position, destination, duration, originActive, destActive, curve);
+
+            TweenVecDic.Add(target, tween);
+
+            return tween;
+        }
+    }
+
+    public static TweenGra CreateTweenGra(Transform target, Color origin, Color destination, float duration, bool originActive, bool destActive, Curve curve)
+    {
+        if (TweenGraDic.ContainsKey(target))
+        {
+            Graphic graphic = target.GetComponent<Graphic>();
+
+            TweenGra tween = TweenGraDic[target];
+
+            tween = new TweenGra(graphic, origin, destination, duration, originActive, destActive, curve);
+
+            return tween;
+        }
+        else
+        {
+            Graphic graphic = target.GetComponent<Graphic>();
+
+            TweenGra tween = new TweenGra(graphic, origin, destination, duration, originActive, destActive, curve);
+
+            TweenGraDic.Add(target, tween);
+
+            return tween;
+        }
+    }
+
+    public static TweenGra CreateTweenGra(Transform target, Color destination, float duration, bool originActive, bool destActive, Curve curve)
+    {
+        if (TweenGraDic.ContainsKey(target))
+        {
+            Graphic graphic = target.GetComponent<Graphic>();
+
+            TweenGra tween = TweenGraDic[target];
+
+            tween = new TweenGra(graphic, graphic.color, destination, duration, originActive, destActive, curve);
+
+            return tween;
+        }
+        else
+        {
+            Graphic graphic = target.GetComponent<Graphic>();
+
+            TweenGra tween = new TweenGra(graphic, graphic.color, destination, duration, originActive, destActive, curve);
+
+            TweenGraDic.Add(target, tween);
+
+            return tween;
+        }
+    }
+
+    public static TweenScale CreateTweenScale(Transform target, Vector3 origin, Vector3 destination, float duration, bool originActive, bool destActive, Curve curve)
+    {
+        if (TweenScaleDic.ContainsKey(target))
+        {
+            TweenScale tween = TweenScaleDic[target];
 
-        return tween;
+            tween = new TweenScale(target, origin, destination, duration, originActive, destActive, curve);
+
+            return tween;
+        }
+        else
+        {
+            TweenScale tween = new TweenScale(target, origin, destination, duration, originActive, destActive, curve);
+
+            TweenScaleDic.Add(target, tween);
+
+            return tween;
+        }
     }
+
+    public static TweenScale CreateTweenScale(Transform target, Vector3 destination, float duration, bool originActive, bool destActive, Curve curve)
+    {
+        if (TweenScaleDic.ContainsKey(target))
+        {
+            TweenScale tween = TweenScaleDic[target];
+
+            tween = new TweenScale(target, target.localScale, destination, duration, originActive, destActive, curve);
+
+            return tween;
+        }
+        else
+        {
+            TweenScale tween = new TweenScale(target, target.localScale, destination, duration, originActive, destActive, curve);
+
+            TweenScaleDic.Add(target, tween);
+
+            return tween;
+        }
+    }
+
+    #endregion
 }

+ 26 - 73
Assets/Script/Manage/ManaData.cs

@@ -1,10 +1,11 @@
-using UnityEngine;
+using LitJson;
+
+using UnityEngine;
 
 using System;
 using System.Xml;
 using System.Collections;
 using System.Collections.Generic;
-using LitJson;
 
 public class ManaData : MonoBehaviour 
 {
@@ -19,7 +20,6 @@ public class ManaData : MonoBehaviour
 
             UpdateSkillStatus();
 
-            Data.SaveCommon();
             ManaLog.Log(string.Format("已升级 花园等级 : <color=red>{0}</color>", _Level));
         }
     }
@@ -30,7 +30,6 @@ public class ManaData : MonoBehaviour
         {
             _Person = value;
 
-            Data.SaveCommon();
             ManaReso.SetText("F_PersonLab", _Person.ToString("0"));
         }
     }
@@ -41,7 +40,6 @@ public class ManaData : MonoBehaviour
         {
             _CoinPerson = value;
 
-            Data.SaveCommon();
             ManaReso.SetText("F_CoinPersonLab", _CoinPerson.ToString("0"));
         }
     }
@@ -52,7 +50,6 @@ public class ManaData : MonoBehaviour
         {
             _Coin = value;
 
-            Data.SaveCommon();
             ManaReso.SetText("F_CoinLab", _Coin.ToString("0"));
             ManaReso.SetText("C_CoinLab", _Coin.ToString("0"));
         }
@@ -64,37 +61,18 @@ public class ManaData : MonoBehaviour
         {
             _Diamond = value;
 
-            Data.SaveCommon();
             ManaReso.SetText("F_DiamondLab", _Diamond.ToString("0"));
         }
     }
-
-    public static bool Connect
-    {
-        get { return _Connect; }
-        set
-        {
-            _Connect = value;
-
-            if (_Connect == true)
-            {
-                ManaUI.EnableBigSkill();
-            }
-            else
-            {
-                
-            }
-        }
-    }
-
+    
     private static int _Level;
-    private static bool _Connect;
     private static float _Person;
     private static float _CoinPerson;
     private static double _Coin;
     private static double _Diamond;
 
-    public static bool SkillBarValid;
+    public static bool SkillBar;
+    public static bool Connect;
     public static float OpTimer;
     public static float NewPerson;
     public static float NewCoinPerson;
@@ -103,7 +81,7 @@ public class ManaData : MonoBehaviour
     public static double CircleTimer;
     public static List<Skill> CoolList;
     public static List<SkillRoot> SkillList;
-    public static List<SkillRoot> TimingList;
+    public static List<SkillRoot> UsingList;
     public static Dictionary<string, SkillRoot> SkillDic;
 
     public static float SkillPerson;         
@@ -112,8 +90,6 @@ public class ManaData : MonoBehaviour
     public static float SkillPersonBuff;  
     public static float SkillCoinPerson;
 
-    public static string BaseUrl = "https://garden.dashgame.com/index.php";
-
     #endregion
 
     private void Awake()
@@ -195,9 +171,6 @@ public class ManaData : MonoBehaviour
 
             Coin += (NewPerson*NewCoinPerson*Circle)*(1 + SkillPlusPerm);
 
-            Data.SaveSkillList();
-            Data.SaveCommon();
-
             ManaLog.Log(string.Format("参观收益<color=red>{0:0}</color> = <color=red>{1}</color> * <color=red>{2}</color> * <color=red>{3}</color> * <color=red>{4}</color> (人次*金币*时间*加成)", (NewPerson * NewCoinPerson * Circle) * (1 + SkillPlusPerm), NewPerson, NewCoinPerson, Circle, 1 + SkillPlusPerm));
         }
 
@@ -205,9 +178,9 @@ public class ManaData : MonoBehaviour
 
         #region 使用中的技能
 
-        for (int i = 0; i < TimingList.Count; i++)
+        for (int i = 0; i < UsingList.Count; i++)
         {
-            if (TimingList[i].DoTiming())
+            if (UsingList[i].DoTiming())
             {
                 i--;
             }
@@ -233,32 +206,15 @@ public class ManaData : MonoBehaviour
         if (OpTimer >= 60)
         {
             OpTimer = 0;
-            //Data.SavePlayerConfig();
         }
 
         #endregion
     }
 
-    private void OnApplicationPause(bool pauseStatus)
-    {
-        if (pauseStatus == false)
-        {
-            URLRequestData urlRequestData = new URLRequestData();
-            urlRequestData.Add("u", SystemInfo.deviceUniqueIdentifier);
-            URLRequest.CreateURLRequest(BaseUrl + "/Home/User/login", urlRequestData, LoginCallBack, URLRequest.Method.POST);
-        }
-    }
-
-    private void LoginCallBack(JsonData jsonData)
-    {
-        
-    }
-
-
     private void RegistValue()
     {
         CoolList = new List<Skill>();
-        TimingList = new List<SkillRoot>();
+        UsingList = new List<SkillRoot>();
 
         #region 读取技能状态
 
@@ -270,33 +226,35 @@ public class ManaData : MonoBehaviour
                 Skill skill = (Skill)SkillDic[xmlNodeList[i].Name];
 
                 skill.Level = int.Parse(xmlNodeList[i].Attributes[2].Value);
-                skill.CdTimer = float.Parse(xmlNodeList[i].Attributes[3].Value);
-                skill.EffectTimer = float.Parse(xmlNodeList[i].Attributes[4].Value);
-                skill.ItemSkillStatus = (SkillStatus)Enum.Parse(typeof(SkillStatus), xmlNodeList[i].Attributes[1].Value);
+                skill.CoolTimer = float.Parse(xmlNodeList[i].Attributes[3].Value);
+                skill.UsingTimer = float.Parse(xmlNodeList[i].Attributes[4].Value);
+
+                skill.ItemStatus = (SkillStatus)Enum.Parse(typeof(SkillStatus), xmlNodeList[i].Attributes[1].Value);
             }
             else if (xmlNodeList[i].Attributes[0].Value == SkillCato.BigSkill.ToString())
             {
                 BigSkill bigSkill = (BigSkill)SkillDic[xmlNodeList[i].Name];
 
                 bigSkill.Level = int.Parse(xmlNodeList[i].Attributes[3].Value);
-                bigSkill.CdTimer = float.Parse(xmlNodeList[i].Attributes[4].Value);
-                bigSkill.EffectTimer = float.Parse(xmlNodeList[i].Attributes[5].Value);
-                bigSkill.ItemSkillStatus = (SkillStatus)Enum.Parse(typeof(SkillStatus), xmlNodeList[i].Attributes[1].Value); //Sa0
-                bigSkill.BarSkillStatus = (SkillStatus)Enum.Parse(typeof(SkillStatus), xmlNodeList[i].Attributes[2].Value); //Sa1
+                bigSkill.CoolTimer = float.Parse(xmlNodeList[i].Attributes[4].Value);
+                bigSkill.UsingTimer = float.Parse(xmlNodeList[i].Attributes[5].Value);
+
+                bigSkill.ItemStatus = (SkillStatus)Enum.Parse(typeof(SkillStatus), xmlNodeList[i].Attributes[1].Value); //Sa0
+                bigSkill.BarStatus = (SkillStatus)Enum.Parse(typeof(SkillStatus), xmlNodeList[i].Attributes[2].Value); //Sa1
             }
             else if (xmlNodeList[i].Attributes[0].Value == SkillCato.Pack.ToString())
             {
                 Pack pack = (Pack)SkillDic[xmlNodeList[i].Attributes[1].Value];
 
                 pack.Level = int.Parse(xmlNodeList[i].Attributes[3].Value);
-                pack.ItemSkillStatus = (SkillStatus)Enum.Parse(typeof(SkillStatus), xmlNodeList[i].Attributes[2].Value);
+                pack.ItemStatus = (SkillStatus)Enum.Parse(typeof(SkillStatus), xmlNodeList[i].Attributes[2].Value);
             }
             else if (xmlNodeList[i].Attributes[0].Value == SkillCato.Ability.ToString())
             {
                 Ability ability = (Ability)SkillDic[xmlNodeList[i].Name];
 
                 ability.Level = int.Parse(xmlNodeList[i].Attributes[2].Value);
-                ability.ItemSkillStatus = (SkillStatus)Enum.Parse(typeof(SkillStatus), xmlNodeList[i].Attributes[1].Value);
+                ability.ItemStatus = (SkillStatus)Enum.Parse(typeof(SkillStatus), xmlNodeList[i].Attributes[1].Value);
             }
             else
             {
@@ -314,21 +272,15 @@ public class ManaData : MonoBehaviour
         #region 读取已解锁的花
 
         XmlAttributeCollection attributes = Data.PlayerNode.SelectSingleNode("FlowerList").Attributes;
+
         string[] strings = attributes[0].Value.Split(' ');
+
         for (int i = 0; i < strings.Length; i++)
         {
             int id = int.Parse(strings[i]);
+
             FlowerInfo flowerInfo = ManaGarden.FlowerDic[id];
             flowerInfo.Unlock = true;
-
-            if (flowerInfo.Special)
-            {
-                ManaGarden.MyFlowerSpec++;
-            }
-            else
-            {
-                ManaGarden.MyFlowerRegu++;
-            }
         }
 
         #endregion
@@ -336,6 +288,7 @@ public class ManaData : MonoBehaviour
         #region 读取已种植的花
 
         attributes = Data.PlayerNode.SelectSingleNode("PlantList").Attributes;
+
         for (int i = 0; i < attributes.Count; i++)
         {
             int id = int.Parse(attributes[i].Value);
@@ -363,7 +316,7 @@ public class ManaData : MonoBehaviour
             
             for (int i = 0; i < SkillList.Count; i++)
             {
-                SkillList[i].CollectOfflineCoin(offlineCircle);
+                SkillList[i].CollectCoin(offlineCircle);
             }
 
             OfflineCoin += (Person * CoinPerson * Circle * offlineCircle) * (1 + SkillPlusPerm);

+ 10 - 38
Assets/Script/Manage/ManaGarden.cs

@@ -13,31 +13,10 @@ public class ManaGarden : MonoBehaviour
 {
     #region 变量
 
-    public static int _MyFlowerSpec; //已拥有
-    public static int _MyFlowerRegu; //已拥有
-    public static int TotalFlowerSpec; //所有花
-    public static int TotalFlowerRegu; //所有花
-
-    public static int MyFlowerSpec
-    {
-        get { return _MyFlowerSpec; }
-        set
-        {
-            _MyFlowerSpec = value;
-
-            UpdateCollectStatus();
-        }
-    }
-    public static int MyFlowerRegu
-    {
-        get { return _MyFlowerRegu; }
-        set
-        {
-            _MyFlowerRegu = value;
-
-            UpdateCollectStatus();
-        }
-    }
+    public static int MyFlowerSpec;
+    public static int MyFlowerRegu;
+    public static int TotalFlowerSpec;
+    public static int TotalFlowerRegu;
 
     public static int SeleId;
     public static Flower SeleFlower;
@@ -52,19 +31,18 @@ public class ManaGarden : MonoBehaviour
     {
         Initializer.RegistValue += RegistValue;
 
-        FlowerDic = new Dictionary<int, FlowerInfo>();
         PlantList = new List<Flower>();
+        FlowerDic = new Dictionary<int, FlowerInfo>();
 
-        ManaReso.Get("Garden", Folder.Object, transform, true).AddComponent<Garden>();
+        ManaReso.Get("Garden", Folder.Object, true, transform, true).AddComponent<Garden>();
 
         #region 生成FlowerItem
 
-        FlowerInfo flowerInfo;
         List<XmlAttributeCollection> attributesList = Data.GetFlowerConfig();
 
         for (int i = 0; i < attributesList.Count; i++)
         {
-            flowerInfo = new FlowerInfo(attributesList[i]);
+            FlowerInfo flowerInfo = new FlowerInfo(attributesList[i]);
 
             if (flowerInfo.Special)
             {
@@ -80,7 +58,7 @@ public class ManaGarden : MonoBehaviour
 
         #endregion
 
-        #region 得到种花的位置
+        #region 得到土堆
 
         FlowerTraList = new List<Transform>()
         {
@@ -135,6 +113,7 @@ public class ManaGarden : MonoBehaviour
     public static void UpdateCollectStatus()
     {
         int myTotalFlower = MyFlowerSpec + MyFlowerRegu;
+
         ManaReso.SetText("F_FlowerLab", myTotalFlower.ToString());
         ManaReso.SetText("G_CollectLab1", string.Format("{0}/{1}", myTotalFlower, TotalFlowerRegu + TotalFlowerSpec));
     }
@@ -150,8 +129,7 @@ public class ManaGarden : MonoBehaviour
 
         flowerInfo.Plant = false;
 
-        SeleFlower.PosTra.SetCollider(true); //空地Collider
-        Data.SavePlantList();
+        SeleFlower.PosTra.SetCollider(true);
     }
 
     public static void RetriveFlowerAll()
@@ -168,8 +146,6 @@ public class ManaGarden : MonoBehaviour
         {
             kv.Value.Plant = false;
         }
-
-        Data.SavePlantList();
     }
 
 
@@ -188,8 +164,6 @@ public class ManaGarden : MonoBehaviour
             Flower flower = ManaReso.GetFlower(SeleId, true, SeleFlowerTra);
 
             PlantList.Add(flower);
-
-            Data.SavePlantList();
         }
     } //FlowerCard种植
 
@@ -231,8 +205,6 @@ public class ManaGarden : MonoBehaviour
                 PlantList.Add(flower);
 
                 tra.SetCollider(false); //空地Collider
-
-                Data.SavePlantList();
             }
         }
     }

+ 59 - 63
Assets/Script/Manage/ManaMiniGame.cs

@@ -20,6 +20,7 @@ public class ManaMiniGame : MonoBehaviour
         set
         {
             _Score = value;
+
             ScoreLab.text = _Score.ToString();
         }
     }
@@ -29,6 +30,7 @@ public class ManaMiniGame : MonoBehaviour
         set
         {
             _Timer = value;
+
             TimerBk.fillAmount = _Timer / GameTime;
             TimerLab.text = _Timer.ToString("0.0");
         }
@@ -39,6 +41,7 @@ public class ManaMiniGame : MonoBehaviour
         set
         {
             _Game = value;
+
             if (_Game)
             {
                 StatusLab.text = "进行中";
@@ -75,6 +78,7 @@ public class ManaMiniGame : MonoBehaviour
         set
         {
             _Panalty = value;
+
             if (_Panalty)
             {
                 StatusLab.text = "操作被冻结";
@@ -92,8 +96,8 @@ public class ManaMiniGame : MonoBehaviour
     private static bool _Pause;
     private static bool _Panalty;
 
-    public static List<Flower> OpFlowerList;
-    public static List<Flower> IdleFlowerList;
+    public static List<Flower> OpList;
+    public static List<Flower> IdleList;
 
     private static float OpTime;
     private static float GameTime;
@@ -142,16 +146,16 @@ public class ManaMiniGame : MonoBehaviour
         OpTimer -= Time.fixedDeltaTime; //生成操作计时
         if (OpTimer <= 0)
         {
-            if (IdleFlowerList.Count > 0)
+            if (IdleList.Count > 0)
             {
                 OpTimer = OpTime;
 
-                Flower flower = IdleFlowerList[Random.Range(0, IdleFlowerList.Count)];
+                Flower flower = IdleList[Random.Range(0, IdleList.Count)];
 
-                flower.CreateOp(OpFlowerList.Count);
+                flower.CreateOp(OpList.Count);
 
-                IdleFlowerList.Remove(flower);
-                OpFlowerList.Add(flower);
+                IdleList.Remove(flower);
+                OpList.Add(flower);
             }
         }
 
@@ -168,7 +172,7 @@ public class ManaMiniGame : MonoBehaviour
         Timer = GameTime;
         OpTimer = OpTime;
 
-        ManaReso.Get("Game").CreateTween(0f, 1f, 0.5f, false, true, Curve.EaseOutQuad);
+        ManaReso.Get("Game").CreateTweenCG(0f, 1f, 0.5f, false, true, Curve.EaseOutQuad);
     }
 
     private static void RegistReference()
@@ -183,27 +187,22 @@ public class ManaMiniGame : MonoBehaviour
 
     #region 小游戏A
 
-    public static void GetScore(int score)
-    {
-        Score += score;
-    }
-
-
-    public static void Ripping()
+    public static void Rip()
     {
         if (PenaltyTimer > 0) //冻结操作
         {
             return;
         }
 
-        if (OpFlowerList.Count > 0)
+        if (OpList.Count > 0)
         {
-            if (OpFlowerList[0].Operate(OpType.Ripping)) //操作正确
+            if (OpList[0].Operate(OpType.Rip)) //操作正确
             {
-                IdleFlowerList.Add(OpFlowerList[0]);
-                OpFlowerList.Remove(OpFlowerList[0]);
+                IdleList.Add(OpList[0]);
 
-                UpdateSequence();
+                OpList.Remove(OpList[0]);
+
+                SetOpStatus();
             }
             else //操作错误
             {
@@ -214,21 +213,21 @@ public class ManaMiniGame : MonoBehaviour
         }
     }
 
-    public static void Watering()
+    public static void Water()
     {
         if (PenaltyTimer > 0) //冻结操作
         {
             return;
         }
 
-        if (OpFlowerList.Count > 0)
+        if (OpList.Count > 0)
         {
-            if (OpFlowerList[0].Operate(OpType.Watering)) //操作正确
+            if (OpList[0].Operate(OpType.Water)) //操作正确
             {
-                IdleFlowerList.Add(OpFlowerList[0]);
-                OpFlowerList.Remove(OpFlowerList[0]);
+                IdleList.Add(OpList[0]);
+                OpList.Remove(OpList[0]);
 
-                UpdateSequence();
+                SetOpStatus();
             }
             else //操作错误
             {
@@ -238,21 +237,21 @@ public class ManaMiniGame : MonoBehaviour
         }
     }
 
-    public static void Fertilizing()
+    public static void Fertilize()
     {
         if (PenaltyTimer > 0) //冻结操作
         {
             return;
         }
 
-        if (OpFlowerList.Count > 0)
+        if (OpList.Count > 0)
         {
-            if (OpFlowerList[0].Operate(OpType.Fertilizing)) //操作正确
+            if (OpList[0].Operate(OpType.Fertilize)) //操作正确
             {
-                IdleFlowerList.Add(OpFlowerList[0]);
-                OpFlowerList.Remove(OpFlowerList[0]);
+                IdleList.Add(OpList[0]);
+                OpList.Remove(OpList[0]);
 
-                UpdateSequence();
+                SetOpStatus();
             }
             else //操作错误
             {
@@ -274,12 +273,12 @@ public class ManaMiniGame : MonoBehaviour
         Pause = false;
         Timer = GameTime;
 
-        for (int i = 0; i < IdleFlowerList.Count; i++)
+        for (int i = 0; i < IdleList.Count; i++)
         {
-            IdleFlowerList[i].GameBegin();
+            IdleList[i].GameBegin();
         }
 
-        OpFlowerList = new List<Flower>();
+        OpList = new List<Flower>();
     }
 
     public static void GameAbort()
@@ -295,30 +294,29 @@ public class ManaMiniGame : MonoBehaviour
         Timer = GameTime;
         OpTimer = OpTime;
 
-        for (int i = 0; i < IdleFlowerList.Count; i++)
+        for (int i = 0; i < IdleList.Count; i++)
         {
-            IdleFlowerList[i].GameOver();
+            IdleList[i].GameOver();
         }
 
-        for (int i = 0; i < OpFlowerList.Count; i++)
+        for (int i = 0; i < OpList.Count; i++)
         {
-            OpFlowerList[i].GameOver();
+            OpList[i].GameOver();
         }
     }
 
     public static void GamePrepare()
     {
-        OpFlowerList = new List<Flower>();
-        IdleFlowerList = new List<Flower>();
-        IdleFlowerList.Add(ManaReso.GetFlower(1, false, ManaReso.Get("FlowerGameTra1")));
-        IdleFlowerList.Add(ManaReso.GetFlower(2, false, ManaReso.Get("FlowerGameTra2")));
-        IdleFlowerList.Add(ManaReso.GetFlower(3, false, ManaReso.Get("FlowerGameTra3")));
-        IdleFlowerList.Add(ManaReso.GetFlower(4, false, ManaReso.Get("FlowerGameTra4")));
-        IdleFlowerList.Add(ManaReso.GetFlower(5, false, ManaReso.Get("FlowerGameTra5")));
-        IdleFlowerList.Add(ManaReso.GetFlower(6, false, ManaReso.Get("FlowerGameTra6")));
-        IdleFlowerList.Add(ManaReso.GetFlower(7, false, ManaReso.Get("FlowerGameTra7")));
-        IdleFlowerList.Add(ManaReso.GetFlower(8, false, ManaReso.Get("FlowerGameTra8")));
-        IdleFlowerList.Add(ManaReso.GetFlower(9, false, ManaReso.Get("FlowerGameTra9")));
+        IdleList = new List<Flower>();
+        IdleList.Add(ManaReso.GetFlower(1, false, ManaReso.Get("FlowerGameTra1")));
+        IdleList.Add(ManaReso.GetFlower(2, false, ManaReso.Get("FlowerGameTra2")));
+        IdleList.Add(ManaReso.GetFlower(3, false, ManaReso.Get("FlowerGameTra3")));
+        IdleList.Add(ManaReso.GetFlower(4, false, ManaReso.Get("FlowerGameTra4")));
+        IdleList.Add(ManaReso.GetFlower(5, false, ManaReso.Get("FlowerGameTra5")));
+        IdleList.Add(ManaReso.GetFlower(6, false, ManaReso.Get("FlowerGameTra6")));
+        IdleList.Add(ManaReso.GetFlower(7, false, ManaReso.Get("FlowerGameTra7")));
+        IdleList.Add(ManaReso.GetFlower(8, false, ManaReso.Get("FlowerGameTra8")));
+        IdleList.Add(ManaReso.GetFlower(9, false, ManaReso.Get("FlowerGameTra9")));
     }
 
 
@@ -342,31 +340,29 @@ public class ManaMiniGame : MonoBehaviour
         Timer = GameTime;
         OpTimer = OpTime;
 
-        for (int i = 0; i < IdleFlowerList.Count; i++)
+        for (int i = 0; i < IdleList.Count; i++)
         {
-            IdleFlowerList[i].GameOver();
+            IdleList[i].GameOver();
         }
 
-        for (int i = 0; i < OpFlowerList.Count; i++)
+        for (int i = 0; i < OpList.Count; i++)
         {
-            OpFlowerList[i].GameOver();
+            OpList[i].GameOver();
         }
 
-        IdleFlowerList.AddRange(OpFlowerList);
-
-        OpFlowerList = new List<Flower>();
+        IdleList.AddRange(OpList);
     }
 
-    private static void UpdateSequence()
+    private static void SetOpStatus()
     {
-        if (OpFlowerList.Count >= 2)
+        if (OpList.Count >= 2)
         {
-            OpFlowerList[0].MarkAsFirst();
-            OpFlowerList[1].MarkAsSecond();
+            OpList[0].SetFirstOp();
+            OpList[1].SetSecondOp();
         }
-        else if (OpFlowerList.Count >= 1)
+        else if (OpList.Count >= 1)
         {
-            OpFlowerList[0].MarkAsFirst();
+            OpList[0].SetFirstOp();
         }
     }
 

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

@@ -17,7 +17,7 @@ public class ManaPlayer : MonoBehaviour
 
     private void Awake()
     {
-        Transform tra = ManaReso.Get("Player", Folder.Object, transform, true, false);
+        Transform tra = ManaReso.Get("Player", Folder.Object, false, transform, false);
 
         tra.AddComponent<Player>();
 

+ 173 - 181
Assets/Script/Manage/ManaReso.cs

@@ -26,7 +26,7 @@ public enum ObjType
     Null,
     Flower,
     HudText,
-    H_FlowerItem,
+    FlowerItem,
 }
 
 public class ManaReso : MonoBehaviour
@@ -34,7 +34,7 @@ public class ManaReso : MonoBehaviour
     #region 变量
 
     public static Dictionary<string, Transform> TraDic;
-    public static Dictionary<ObjType, GameObject> PrefabDic;
+    public static Dictionary<ObjType, Object> ObjDic;
     public static Dictionary<ObjType, List<GameObject>> ObjectPool;
 
     #endregion
@@ -42,55 +42,53 @@ public class ManaReso : MonoBehaviour
     private void Awake()
     {
         TraDic = new Dictionary<string, Transform>();
-        PrefabDic = new Dictionary<ObjType, GameObject>();
+        ObjDic = new Dictionary<ObjType, Object>();
         ObjectPool = new Dictionary<ObjType, List<GameObject>>();
 
-        Get("ObjPool", Folder.Object, transform);
-        Get("MainCamera", Folder.Object, false);
+        Get("ObjPool", Folder.Object, true, transform,  true);
+        Get("MainCamera", Folder.Object, false, null,  true);
     }
 
+    #region TraDic
 
-    public static void SetText(string goName, string text)
-    {
-        Text tempText = Get<Text>(goName);
-
-        tempText.text = text;
-    }
-
-    public static void SetSprite(string goName, Sprite sprite)
-    {
-        Image image = Get<Image>(goName);
-
-        image.sprite = sprite;
-    }
-
-    public static void SetActive(string goName, bool active)
+    public static T Get<T>(string goName)
     {
-        Get(goName).SetActive(active);
-    }
+        Transform tra;
 
-    public static void SetButtonEvent(string goName, params UnityAction[] onClicks)
-    {
-        Button button = Get<Button>(goName);
+        if (TraDic.TryGetValue(goName, out tra))
+        {
+            T t = tra.GetComponent<T>();
 
-        button.onClick = new Button.ButtonClickedEvent();
+            if (t == null)
+            {
+                throw new Exception();
+            }
 
-        for (int i = 0; i < onClicks.Length; i++)
+            return t;
+        }
+        else
         {
-            button.onClick.AddListener(onClicks[i]);
+            throw new Exception(goName);
         }
     }
 
-    public static void AddButtonEvent(string goName, params UnityAction[] onClicks)
+    public static Transform Get(string goName)
     {
-        Button button = Get<Button>(goName);
+        Transform tra;
 
-        for (int i = 0; i < onClicks.Length; i++)
+        if (TraDic.TryGetValue(goName, out tra))
         {
-            button.onClick.AddListener(onClicks[i]);
+            return tra;
+        }
+        else
+        {
+            throw new Exception(goName);
         }
     }
 
+    #endregion
+
+    #region ObjPool
 
     public static void Save<T>(T t) where T : Component
     {
@@ -116,16 +114,13 @@ public class ManaReso : MonoBehaviour
 
             goList.Add(go);
 
-            if (objRoot.ObjType != ObjType.HudText)
-            {
-                go.transform.SetParent(TraDic["ObjPool"]);
-            }
+            go.transform.SetParent(Get("ObjPool"));
         }
         else
         {
             throw new Exception();
         }
-    } //ObjPool
+    }
 
     public static void Save(GameObject go)
     {
@@ -149,40 +144,41 @@ public class ManaReso : MonoBehaviour
 
             goList.Add(go);
 
-            if (objRoot.ObjType != ObjType.HudText)
-            {
-                go.transform.SetParent(TraDic["ObjPool"]);
-            }
+            go.transform.SetParent(Get("ObjPool"));
         }
         else
         {
             throw new Exception();
         }
-    } //ObjPool
+    }
 
 
-    public static T Get<T>(string goName)
+    public static T Get<T>(ObjType objType)
     {
-        Transform tra;
+        List<GameObject> goList;
 
-        if (TraDic.TryGetValue(goName, out tra))
+        if (ObjectPool.TryGetValue(objType, out goList))
         {
-            T t = tra.GetComponent<T>();
-
-            if (t == null)
+            if (goList.Count > 0)
             {
-                throw new Exception();
-            }
+                GameObject go = goList[0];
 
-            return t;
-        }
-        else
-        {
-            throw new Exception(goName);
+                go.SetActive(true);
+                goList.RemoveAt(0);
+
+                T t = go.GetComponent<T>();
+
+                if (t != null)
+                {
+                    return t;
+                }
+            }
         }
-    } //TraDic
 
-    public static T Get<T>(ObjType objType)
+        return default(T);
+    }
+
+    public static Transform Get(Transform par, Vector3 pos, ObjType objType)
     {
         List<GameObject> goList;
 
@@ -193,34 +189,34 @@ public class ManaReso : MonoBehaviour
                 GameObject go = goList[0];
 
                 go.SetActive(true);
+                go.SetParent(par);
+                go.transform.position = pos;
+
                 goList.RemoveAt(0);
 
-                return go.GetComponent<T>();
+                return go.transform;
             }
         }
 
-        return default(T);
-    } //ObjPool
+        return null;
+    }
 
-    public static Transform Get(string goName)
-    {
-        Transform tra;
 
-        if (TraDic.TryGetValue(goName, out tra))
-        {
-            return tra;
-        }
-        else
+    public static Transform Get(string prefabName, Folder folder, bool compile, Transform par, Vector3 pos, ObjType objType = ObjType.Null)
+    {
+        if (objType != ObjType.Null)
         {
-            throw new Exception(goName);
+            Transform tra = Get(par, pos, objType);
+
+            if (tra != null)
+            {
+                return tra;
+            }
         }
-    } //TraDic
 
-    public static Transform Get(string prefabName, Folder folder, bool compile = true, ObjType objType = ObjType.Null)
-    {
         GameObject go = Load<GameObject>(prefabName, folder, objType);
 
-        go = Instantiate(go, go.transform.position, go.transform.rotation);
+        go = Instantiate(go, pos, Quaternion.identity, par);
         go.name = go.name.Replace("(Clone)", "");
 
         if (compile)
@@ -229,13 +225,13 @@ public class ManaReso : MonoBehaviour
         }
 
         return go.transform;
-    } //实例化
+    }
 
-    public static Transform Get(string prefabName, Folder folder, Vector3 pos, Quaternion rot, Transform par, bool compile = true, ObjType objType = ObjType.Null)
+    public static Transform Get(string prefabName, Folder folder, bool compile, Transform par, bool worldSpace, ObjType objType = ObjType.Null)
     {
         GameObject go = Load<GameObject>(prefabName, folder, objType);
 
-        go = Instantiate(go, pos, rot, par);
+        go = Instantiate(go, par, worldSpace);
         go.name = go.name.Replace("(Clone)", "");
 
         if (compile)
@@ -244,83 +240,133 @@ public class ManaReso : MonoBehaviour
         }
 
         return go.transform;
-    } //实例化
+    }
+
 
-    public static Transform Get(string prefabName, Folder folder, Transform par, bool worldSpace, bool compile = true, ObjType objType = ObjType.Null)
+    public static void GetHudText(string str, Transform posTra)
     {
-        GameObject go = Load<GameObject>(prefabName, folder, objType);
+        HudText hudText = Get<HudText>(ObjType.HudText);
 
-        go = Instantiate(go, par, worldSpace);
-        go.name = go.name.Replace("(Clone)", "");
+        if (hudText == null)
+        {
+            hudText = Get("HudText", Folder.PrefabUI, false, Get("HudParent"), Camera.main.WorldToScreenPoint(posTra.position), ObjType.HudText).AddComponent<HudText>();
+            hudText.ObjType = ObjType.HudText;
+        }
+        else
+        {
+            hudText.transform.position = Camera.main.WorldToScreenPoint(posTra.position);
+            hudText.transform.SetParent(Get("HudParent"));
+        }
 
-        if (compile)
+        hudText.Show(str, Color.red);
+    }
+
+    public static Flower GetFlower(int id, bool collider, Transform posTra)
+    {
+        Flower flower = Get<Flower>(ObjType.Flower);
+
+        if (flower == null)
         {
-            Auxiliary.CompileDic(go.transform, TraDic);
+            flower = Get("Flower", Folder.Object, false, posTra, false, ObjType.Flower).AddComponent<Flower>();
+
+            flower.ObjType = ObjType.Flower;
+            flower.LocalPos = flower.transform.localPosition;
+        }
+        else
+        {
+            flower.transform.parent = posTra;
+            flower.transform.localPosition = flower.LocalPos;
         }
 
-        return go.transform;
-    } //实例化
+        flower.Id = id;
+        flower.PosTra = posTra;
+        flower.SetCollider(collider);
+
+        return flower;
+    }
+
+    #endregion
 
+    #region ShortCut
 
-    public static T Load<T>(string url) where T: Object
+    public static void SetText(string goName, string text)
     {
-        string[] strings = url.Split(' ');
+        Text tempText = Get<Text>(goName);
 
-        string targetName = strings[0];
+        tempText.text = text;
+    }
 
-        Folder folder = (Folder) Enum.Parse(typeof(Folder), strings[1]);
+    public static void SetSprite(string goName, Sprite sprite)
+    {
+        Image image = Get<Image>(goName);
 
-        ObjType objType;
+        image.sprite = sprite;
+    }
 
-        if (strings.Length > 2)
+    public static void SetActive(string goName, bool active)
+    {
+        Get(goName).SetActive(active);
+    }
+
+    public static void SetButtonEvent(string goName, params UnityAction[] onClicks)
+    {
+        Button button = Get<Button>(goName);
+
+        button.onClick = new Button.ButtonClickedEvent();
+
+        for (int i = 0; i < onClicks.Length; i++)
         {
-            objType = (ObjType) Enum.Parse(typeof(ObjType), strings[2]);
+            button.onClick.AddListener(onClicks[i]);
         }
-        else
+    }
+
+    public static void AddButtonEvent(string goName, params UnityAction[] onClicks)
+    {
+        Button button = Get<Button>(goName);
+
+        for (int i = 0; i < onClicks.Length; i++)
         {
-            objType = ObjType.Null;
+            button.onClick.AddListener(onClicks[i]);
         }
-
-        return Load<T>(targetName, folder, objType);
     }
 
-    public static T Load<T>(string targetName, Folder folder, ObjType objType = ObjType.Null) where T : Object
-    {
-        GameObject go;
+    #endregion
 
-        if (PrefabDic.TryGetValue(objType, out go))
+    public static T Load<T>(string name, Folder folder, ObjType objType = ObjType.Null) where T : Object
+    {
+        Object obj;
+        
+        if (ObjDic.TryGetValue(objType, out obj))
         {
-            return (T) Convert.ChangeType(go, typeof(T));
+            return (T) obj;
         }
         else
         {
-            #region 加载Prefab
-
             T t;
 
             if (folder == Folder.Skill)
             {
-                t = Resources.Load<T>(@"Sprite\SpriteUI\Skill\" + targetName);
+                t = Resources.Load<T>(@"Sprite\SpriteUI\Skill\" + name);
             }
             else if (folder == Folder.Object)
             {
-                t = Resources.Load<T>(@"Prefab\Object\" + targetName);
+                t = Resources.Load<T>(@"Prefab\Object\" + name);
             }
             else if (folder == Folder.Garden)
             {
-                t = Resources.Load<T>(@"Sprite\Garden\" + targetName);
+                t = Resources.Load<T>(@"Sprite\Garden\" + name);
             }
             else if (folder == Folder.SpriteUI)
             {
-                t = Resources.Load<T>(@"Sprite\SpriteUI\" + targetName);
+                t = Resources.Load<T>(@"Sprite\SpriteUI\" + name);
             }
             else if (folder == Folder.PrefabUI)
             {
-                t = Resources.Load<T>(@"Prefab\PrefabUI\" + targetName);
+                t = Resources.Load<T>(@"Prefab\PrefabUI\" + name);
             }
             else if (folder == Folder.Character)
             {
-                t = Resources.Load<T>(@"Sprite\Character\" + targetName);
+                t = Resources.Load<T>(@"Sprite\Character\" + name);
             }
             else
             {
@@ -329,93 +375,53 @@ public class ManaReso : MonoBehaviour
 
             if (t == null)
             {
-                throw new Exception(targetName);
+                throw new Exception(name);
             }
 
             if (objType != ObjType.Null)
             {
-                PrefabDic.Add(objType, (GameObject) Convert.ChangeType(t, typeof(GameObject)));
+                ObjDic.Add(objType, t);
 
                 ObjectPool.Add(objType, new List<GameObject>());
             }
 
             return t;
-
-            #endregion
         }
     }
 
-
-    public static Text GetHudText(string message, Color color, Transform target)
-    {
-        HudText hudText = Get<HudText>(ObjType.HudText);
-
-        if (hudText == null)
-        {
-            hudText = Get("HudText", Folder.PrefabUI, Camera.main.WorldToScreenPoint(target.position), Quaternion.identity, TraDic["HudParent"], false, ObjType.HudText).AddComponent<HudText>();
-        }
-
-        hudText.transform.position = Camera.main.WorldToScreenPoint(target.position);
-        hudText.Set(message, color);
-
-        return hudText.GetComponent<Text>();
-    }
-
-    public static Flower GetFlower(int id, bool enableCollider, Transform posTra)
-    {
-        Flower flower = Get<Flower>(ObjType.Flower);
-
-        if (flower == null)
-        {
-            flower = Get("Flower", Folder.Object, posTra, false, false, ObjType.Flower).AddComponent<Flower>();
-            
-            flower.ObjType = ObjType.Flower;
-            flower.LocalPos = flower.transform.localPosition;
-        }
-        else
-        {
-            flower.transform.parent = posTra;
-            flower.transform.localPosition = flower.LocalPos;
-        }
-
-        flower.Id = id;
-        flower.PosTra = posTra;
-        flower.SetCollider(enableCollider);
-        posTra.SetCollider(false); //空地Collider
-
-        return flower;
-    }
-
     public static Transform GetSkillItem(SkillRoot skillRoot)
     {
         Transform tra;
+        Dictionary<string, Transform> dic = new Dictionary<string, Transform>();
 
         if (skillRoot.Class == SkillClass.Elf)
         {
-            tra = Get("Fd_ElfItem", Folder.PrefabUI, Get("Fd_Grid"), false, false);
+            tra = Get("SkillItem", Folder.PrefabUI, false, Get("Fd_Grid"), false);
         }
         else if (skillRoot.Class == SkillClass.Store)
         {
-            tra = Get("Fc_StoreItem", Folder.PrefabUI, Get("Fc_Grid"), false, false);
+            tra = Get("SkillItem", Folder.PrefabUI, false, Get("Fc_Grid"), false);
         }
         else if (skillRoot.Class == SkillClass.Magic)
         {
-            tra = Get("Fb_MagicItem", Folder.PrefabUI, Get("Fb_Grid"), false, false);
+            tra = Get("SkillItem", Folder.PrefabUI, false, Get("Fb_Grid"), false);
         }
         else if (skillRoot.Class == SkillClass.Garden)
         {
-            tra = Get("Fa_GardenItem", Folder.PrefabUI, Get("Fa_Grid"), false, false);
+            tra = Get("SkillItem", Folder.PrefabUI, false, Get("Fa_Grid"), false);
         }
         else
         {
             throw new Exception();
         }
 
-        skillRoot.ItemTit = tra.GetChild(0).GetComponent<Text>();
-        skillRoot.ItemBtn = tra.GetChild(1).GetComponent<Button>();
-        skillRoot.ItemLab = tra.GetChild(0).GetChild(0).GetComponent<Text>();
-        skillRoot.ItemIcon = tra.GetChild(2).GetComponent<Image>();
-        skillRoot.ItemBtnLab = tra.GetChild(1).GetChild(0).GetComponent<Text>();
+        Auxiliary.CompileDic(tra, dic);
+
+        skillRoot.ItemTit = dic["Tit"].GetComponent<Text>();
+        skillRoot.ItemBtn = dic["Btn"].GetComponent<Button>();
+        skillRoot.ItemLab = dic["Lab"].GetComponent<Text>();
+        skillRoot.ItemIcon = dic["Icon"].GetComponent<Image>();
+        skillRoot.ItemBtnLab = dic["BtnLab"].GetComponent<Text>();
 
         if (!string.IsNullOrEmpty(skillRoot.Icon))
         {
@@ -425,20 +431,15 @@ public class ManaReso : MonoBehaviour
         return tra;
     }
 
-    public static Transform GetDateItem(Transform parTra)
+    public static Transform GetFlowerCardItem()
     {
-        return Get("B_DateItem", Folder.PrefabUI, parTra, false, false);
-    }
-
-    public static Transform GetFlowerItem()
-    {
-        Transform tra = Get<Transform>(ObjType.H_FlowerItem);
+        Transform tra = Get<Transform>(ObjType.FlowerItem);
 
         if (tra == null)
         {
-            ObjRoot objRoot = Get("H_FlowerItem", Folder.PrefabUI, Get("H_Grid"), false, false, ObjType.H_FlowerItem).AddComponent<ObjRoot>();
+            ObjRoot objRoot = Get("FlowerCardItem", Folder.PrefabUI, false, Get("H_Grid"), false, ObjType.FlowerItem).AddComponent<ObjRoot>();
 
-            objRoot.ObjType = ObjType.H_FlowerItem;
+            objRoot.ObjType = ObjType.FlowerItem;
 
             return objRoot.transform;
         }
@@ -449,13 +450,4 @@ public class ManaReso : MonoBehaviour
             return tra;
         }
     }
-
-    public static HudTarget GetHudTarget(string prefabName, Transform posTra, Transform par)
-    {
-        HudTarget hudTarget = Get(prefabName, Folder.PrefabUI, par, true).AddComponent<HudTarget>();
-
-        hudTarget.PosTra = posTra;
-
-        return hudTarget;
-    }
 }

+ 48 - 82
Assets/Script/Manage/ManaUI.cs

@@ -17,8 +17,8 @@ public class ManaUI : MonoBehaviour
         Initializer.RegistValue += RegistValue;
         Initializer.RegistReference += RegistReference;
 
-        ManaReso.Get("Canvas", Folder.PrefabUI);
-        ManaReso.Get("EventSystem", Folder.PrefabUI, false);
+        ManaReso.Get("Canvas", Folder.PrefabUI, true, null, true);
+        ManaReso.Get("EventSystem", Folder.PrefabUI, false, null, false);
     }
 
 
@@ -33,7 +33,7 @@ public class ManaUI : MonoBehaviour
             "A_Confirm",
             () =>
             {
-                ManaReso.Get("B_SignIn").Forward(TweenType.CG);
+                ManaReso.Get("B_SignIn").TweenBacCG();
 
                 ManaReso.SetActive("A_Notice", false);
             }
@@ -65,17 +65,17 @@ public class ManaUI : MonoBehaviour
 
         #region B_SignIn
 
-        ManaReso.Get("B_SignIn").CreateTween(0f, 1f, 0.5f, false, true, Curve.EaseOutQuad);
+        ManaReso.Get("B_SignIn").CreateTweenCG(0f, 1f, 0.5f, false, true, Curve.EaseOutQuad);
 
         Transform tra = ManaReso.Get("B_Grid");
 
-        SeleDateItem = ManaReso.GetDateItem(tra);
-        ManaReso.GetDateItem(tra);
-        ManaReso.GetDateItem(tra);
-        ManaReso.GetDateItem(tra);
-        ManaReso.GetDateItem(tra);
-        ManaReso.GetDateItem(tra);
-        ManaReso.GetDateItem(tra);
+        SeleDateItem = ManaReso.Get("DateItem", Folder.PrefabUI, false, tra, false);
+        ManaReso.Get("DateItem", Folder.PrefabUI, false, tra, false);
+        ManaReso.Get("DateItem", Folder.PrefabUI, false, tra, false);
+        ManaReso.Get("DateItem", Folder.PrefabUI, false, tra, false);
+        ManaReso.Get("DateItem", Folder.PrefabUI, false, tra, false);
+        ManaReso.Get("DateItem", Folder.PrefabUI, false, tra, false);
+        ManaReso.Get("DateItem", Folder.PrefabUI, false, tra, false);
 
         #endregion
 
@@ -86,8 +86,8 @@ public class ManaUI : MonoBehaviour
             "B_Confirm",
             () =>
             {
-                ManaReso.Get("Game").Forward(TweenType.CG);
-                ManaReso.Get("B_SignIn").Backward(TweenType.CG);
+                ManaReso.Get("Game").TweenForCG();
+                ManaReso.Get("B_SignIn").TweenBacCG();
             }
         );
 
@@ -107,7 +107,7 @@ public class ManaUI : MonoBehaviour
                 ManaReso.SetActive("C_Main", false);
                 ManaReso.SetActive("F_Manage", true);
 
-                ManaReso.Get("F_Manage").Forward(TweenType.Vector);
+                ManaReso.Get("F_Manage").TweenForVec();
             }
         );
 
@@ -121,8 +121,8 @@ public class ManaUI : MonoBehaviour
         (
             () =>
             {
-                ManaReso.Get("D_MiniGame").Forward(TweenType.Vector);
-                ManaReso.Get("GardenGame").Forward(TweenType.Vector);
+                ManaReso.Get("D_MiniGame").TweenForVec();
+                ManaReso.Get("GardenGame").TweenForVec();
 
                 ManaMiniGame.GamePrepare();
             }
@@ -142,7 +142,7 @@ public class ManaUI : MonoBehaviour
         ManaReso.AddButtonEvent
         (
             "D_Rip2",
-            ManaMiniGame.Ripping
+            ManaMiniGame.Rip
         );
 
         #endregion
@@ -182,7 +182,7 @@ public class ManaUI : MonoBehaviour
         ManaReso.AddButtonEvent
         (
             "D_Water2",
-            ManaMiniGame.Watering
+            ManaMiniGame.Water
         );
 
         #endregion
@@ -192,22 +192,22 @@ public class ManaUI : MonoBehaviour
         ManaReso.AddButtonEvent
         (
             "D_Fertilize2",
-            ManaMiniGame.Fertilizing
+            ManaMiniGame.Fertilize
         );
 
         #endregion
 
         #region D_MiniGame
 
-        ManaReso.Get("D_MiniGame").CreateTween(ManaReso.Get("Canvas").position, 1f, false, true, Curve.EaseOutQuad);
+        ManaReso.Get("D_MiniGame").CreateTweenVec(ManaReso.Get("Canvas").position, 1f, false, true, Curve.EaseOutQuad);
 
         #endregion
 
 
         #region Da_Grid
 
-        ManaReso.Get("Da_AwardItem", Folder.PrefabUI, ManaReso.Get("Da_Grid"), false, false);
-        ManaReso.Get("Da_AwardItem", Folder.PrefabUI, ManaReso.Get("Da_Grid"), false, false);
+        ManaReso.Get("AwardItem", Folder.PrefabUI, false, ManaReso.Get("Da_Grid"),  false);
+        ManaReso.Get("AwardItem", Folder.PrefabUI, false, ManaReso.Get("Da_Grid"),  false);
 
         #endregion
 
@@ -218,8 +218,8 @@ public class ManaUI : MonoBehaviour
             "Da_Quit",
             () =>
             {
-                ManaReso.Get("D_MiniGame").Backward(TweenType.Vector);
-                ManaReso.Get("GardenGame").Backward(TweenType.Vector);
+                ManaReso.Get("D_MiniGame").TweenBacVec();
+                ManaReso.Get("GardenGame").TweenBacVec();
 
                 ManaReso.SetActive("Da_Info", false);
 
@@ -271,7 +271,7 @@ public class ManaUI : MonoBehaviour
                 ManaReso.SetActive("C_Main", true);
                 ManaReso.SetActive("F_Manage", false);
 
-                ManaReso.Get("F_Manage").Backward(TweenType.Vector);
+                ManaReso.Get("F_Manage").TweenBacVec();
             }
         );
 
@@ -367,7 +367,7 @@ public class ManaUI : MonoBehaviour
                 ManaReso.SetActive("Fb_Magic", false);
                 ManaReso.SetActive("Fa_Garden", true);
 
-                if (ManaData.SkillBarValid)
+                if (ManaData.SkillBar)
                 {
                     ManaReso.SetActive("F_SkillBar", true);
                 }
@@ -383,7 +383,7 @@ public class ManaUI : MonoBehaviour
             "F_Flower",
             () =>
             {
-                ManaReso.Get("G_Flower").Forward(TweenType.CG);
+                ManaReso.Get("G_Flower").TweenForCG();
             }
         );
 
@@ -391,23 +391,18 @@ public class ManaUI : MonoBehaviour
 
         #region F_Manage
 
-        ManaReso.Get("F_Manage").CreateTween(ManaReso.Get("F_TweenTra").position, 0.5f, false, true, Curve.EaseOutQuad);
+        ManaReso.Get("F_Manage").CreateTweenVec(ManaReso.Get("F_TweenTra").position, 0.5f, false, true, Curve.EaseOutQuad);
 
         #endregion
 
-        #region F_Reconnect
+        #region Fg_Btn
 
         ManaReso.AddButtonEvent
         (
-            "F_Reconnect",
+            "Fg_Btn",
             () =>
             {
-                ManaReso.SetActive("F_Skill0", true);
-                ManaReso.SetActive("F_Skill1", true);
-                ManaReso.SetActive("F_Skill2", true);
-                ManaReso.SetActive("F_Skill3", true);
-                ManaReso.SetActive("F_StatusLab", false);
-                ManaReso.SetActive("F_Reconnect", false);
+                
             }
         );
 
@@ -421,7 +416,7 @@ public class ManaUI : MonoBehaviour
             "Fe_Close",
             () =>
             {
-                ManaReso.Get("Fe_Info").Backward(TweenType.CG);
+                ManaReso.Get("Fe_Info").TweenBacCG();
             }
         );
 
@@ -429,7 +424,7 @@ public class ManaUI : MonoBehaviour
 
         #region Fe_Info
 
-        ManaReso.Get("Fe_Info").CreateTween(0f, 1f, 0.1f, false, true, Curve.EaseOutQuad);
+        ManaReso.Get("Fe_Info").CreateTweenCG(0f, 1f, 0.1f, false, true, Curve.EaseOutQuad);
 
         #endregion
 
@@ -444,7 +439,7 @@ public class ManaUI : MonoBehaviour
             "G_Close",
             () =>
             {
-                ManaReso.Get("G_Flower").Backward(TweenType.CG);
+                ManaReso.Get("G_Flower").TweenBacCG();
             }
         );
 
@@ -493,7 +488,7 @@ public class ManaUI : MonoBehaviour
             {
                 ManaGarden.RetriveFlowerAll();
                 
-                ManaReso.Get("G_Flower").Backward(TweenType.CG);
+                ManaReso.Get("G_Flower").TweenBacCG();
             }
         );
 
@@ -501,7 +496,7 @@ public class ManaUI : MonoBehaviour
 
         #region G_Flower
 
-        Tween tween = ManaReso.Get("G_Flower").CreateTween(0f, 1f, 0.25f, false, true, Curve.EaseOutQuad);
+        Tween tween = ManaReso.Get("G_Flower").CreateTweenCG(0f, 1f, 0.25f, false, true, Curve.EaseOutQuad);
 
         tween.OnForwardStart += () =>
         {
@@ -517,14 +512,6 @@ public class ManaUI : MonoBehaviour
 
         #region H
 
-        #region H_Scrr
-
-        FlowerCard flowerCard = ManaReso.Get("H_Scrr").AddComponent<FlowerCard>();
-
-        flowerCard.ViewAmt = 3;
-
-        #endregion
-
         #region H_Prev
 
         ManaReso.AddButtonEvent
@@ -532,8 +519,7 @@ public class ManaUI : MonoBehaviour
             "H_Prev",
             () =>
             {
-                flowerCard = ManaReso.Get<FlowerCard>("H_Scrr");
-                flowerCard.PrevItem();
+                ManaReso.Get<FlowerCard>("H_FlowerCard").PrevItem();
             }
         );
 
@@ -546,8 +532,7 @@ public class ManaUI : MonoBehaviour
             "H_Next",
             () =>
             {
-                flowerCard = ManaReso.Get<FlowerCard>("H_Scrr");
-                flowerCard.NextItem();
+                ManaReso.Get<FlowerCard>("H_FlowerCard").NextItem();
             }
         );
 
@@ -560,8 +545,8 @@ public class ManaUI : MonoBehaviour
             "H_Place",
             () =>
             {
-                ManaReso.Get("H_FlowerCard").Backward(TweenType.CG);
-                ManaReso.Get<FlowerCard>("H_Scrr").Close();
+                ManaReso.Get("H_FlowerCard").TweenBacCG();
+                ManaReso.Get<FlowerCard>("H_FlowerCard").Close();
                 ManaGarden.PlaceFlower();
             }
         );
@@ -575,8 +560,8 @@ public class ManaUI : MonoBehaviour
             "H_Close",
             () =>
             {
-                ManaReso.Get("H_FlowerCard").Backward(TweenType.CG);
-                ManaReso.Get<FlowerCard>("H_Scrr").Close();
+                ManaReso.Get("H_FlowerCard").TweenBacCG();
+                ManaReso.Get<FlowerCard>("H_FlowerCard").Close();
             }
         );
 
@@ -592,7 +577,7 @@ public class ManaUI : MonoBehaviour
             {
                 ManaGarden.RetriveFlower();
 
-                ManaReso.Get("H_FlowerCard").Backward(TweenType.CG);
+                ManaReso.Get("H_FlowerCard").TweenBacCG();
             }
         );
 
@@ -600,7 +585,9 @@ public class ManaUI : MonoBehaviour
 
         #region H_FlowerCard
 
-        ManaReso.Get("H_FlowerCard").CreateTween(0f, 1f, 0.25f, false, true, Curve.EaseOutQuad);
+        ManaReso.Get("H_FlowerCard").AddComponent<FlowerCard>();
+
+        ManaReso.Get("H_FlowerCard").CreateTweenCG(0f, 1f, 0.25f, false, true, Curve.EaseOutQuad);
 
         #endregion
 
@@ -609,8 +596,8 @@ public class ManaUI : MonoBehaviour
         #region I
 
         tra = ManaReso.Get("I_BlackMask");
-        tra.CreateTween(new Color(0, 0, 0, 0), 0.5f, true, true, Curve.EaseOutQuad);
-        tra.Forward(TweenType.Graphic);
+        tra.CreateTweenGra(new Color(0, 0, 0, 0), 0.5f, true, true, Curve.EaseOutQuad);
+        tra.TweenForGra();
 
         tra.GetComponent<Button>().onClick.AddListener
         (
@@ -627,25 +614,4 @@ public class ManaUI : MonoBehaviour
     {
 
     }
-
-
-    public static void DisableBigSkill()
-    {
-        ManaReso.Get("F_Skill0").SetActive(false);
-        ManaReso.Get("F_Skill1").SetActive(false);
-        ManaReso.Get("F_Skill2").SetActive(false);
-        ManaReso.Get("F_Skill3").SetActive(false);
-        ManaReso.Get("F_StatusLab").SetActive(true);
-        ManaReso.Get("F_Reconnect").SetActive(true);
-    }
-
-    public static void EnableBigSkill()
-    {
-        ManaReso.Get("F_Skill0").SetActive(true);
-        ManaReso.Get("F_Skill1").SetActive(true);
-        ManaReso.Get("F_Skill2").SetActive(true);
-        ManaReso.Get("F_Skill3").SetActive(true);
-        ManaReso.Get("F_StatusLab").SetActive(false);
-        ManaReso.Get("F_Reconnect").SetActive(false);
-    }
 }

+ 46 - 43
Assets/Script/Object/Flower.cs

@@ -9,9 +9,9 @@ using System.Collections.Generic;
 
 public enum OpType
 {
-    Ripping,
-    Watering,
-    Fertilizing,
+    Rip,
+    Water,
+    Fertilize,
 }
 
 public class FlowerInfo
@@ -25,7 +25,7 @@ public class FlowerInfo
         {
             _Plant = value;
 
-            if (_Plant == true)
+            if (_Plant)
             {
                 Text.text = "已放置";
             }
@@ -42,12 +42,23 @@ public class FlowerInfo
         {
             _Unlock = value;
 
-            if (_Unlock == true)
+            if (_Unlock)
             {
                 Text.text = "";
                 Button.interactable = true;
 
-                ManaData.SkillPlusPerm += 0.1f; //每解锁一朵花 收入增加10%
+                if (Special)
+                {
+                    ManaGarden.MyFlowerSpec++;
+                }
+                else
+                {
+                    ManaGarden.MyFlowerRegu++;
+                }
+
+                ManaGarden.UpdateCollectStatus();
+
+                ManaData.SkillPlusPerm += 0.1f;
             }
         }
     }
@@ -69,10 +80,10 @@ public class FlowerInfo
 
     public FlowerInfo(XmlAttributeCollection attributes)
     {
-        Transform tra = ManaReso.Get("G_FlowerItem", Folder.PrefabUI, ManaReso.Get("G_RegularGrid"), false, false);
+        Transform tra = ManaReso.Get("FlowerHouseItem", Folder.PrefabUI, false, ManaReso.Get("G_RegularGrid"),  false);
 
-        Text = tra.FindChild("G_FlowerItemLab").GetComponent<Text>();
-        Image = tra.FindChild("G_FlowerItemIcon").GetComponent<Image>();
+        Text = tra.FindChild("Lab").GetComponent<Text>();
+        Image = tra.FindChild("Icon").GetComponent<Image>();
         Button = tra.GetComponent<Button>();
 
         Id = int.Parse(attributes[0].Value);
@@ -100,7 +111,7 @@ public class Flower : ObjRoot, IPointerClickHandler
 {
     #region 变量
 
-    #region 小游戏A
+    #region MiniGame
 
     public int Phase
     {
@@ -109,7 +120,17 @@ public class Flower : ObjRoot, IPointerClickHandler
         {
             _Phase = value;
 
-            OnPhaseChange();
+            if (Phase == 0)
+            {
+                PhaseTexm.text = "阶段0";
+            }
+            else if (Phase == 1)
+            {
+                ManaReso.GetHudText("得分+1", ChildDic["ScoreHudTra"]);
+                ManaMiniGame.Score += 1;
+
+                GameReset();
+            }
         }
     }
 
@@ -170,7 +191,7 @@ public class Flower : ObjRoot, IPointerClickHandler
         GameReset();
     }
 
-    public void MarkAsFirst()
+    public void SetFirstOp()
     {
         OperateSr1.SetAlpha(1);
         OperateSr2.SetAlpha(1);
@@ -179,7 +200,7 @@ public class Flower : ObjRoot, IPointerClickHandler
         OperateSr2.SetActive(true);
     }
 
-    public void MarkAsSecond()
+    public void SetSecondOp()
     {
         OperateSr1.SetAlpha(0);
         OperateSr2.SetAlpha(1);
@@ -188,7 +209,7 @@ public class Flower : ObjRoot, IPointerClickHandler
         OperateSr2.SetActive(true);
     }
 
-    public void MarkAsStandby()
+    public void SetThirdOp()
     {
         OperateSr1.SetAlpha(0);
         OperateSr2.SetAlpha(0.5f);
@@ -203,31 +224,31 @@ public class Flower : ObjRoot, IPointerClickHandler
 
         if (random <= 0.3333333f)
         {
-            OpType = OpType.Ripping;
+            OpType = OpType.Rip;
             OperateSr2.sprite = ManaReso.Load<Sprite>("Rip", Folder.SpriteUI);
         }
         else if (random <= 0.6666666f)
         {
-            OpType = OpType.Watering;
+            OpType = OpType.Water;
             OperateSr2.sprite = ManaReso.Load<Sprite>("Water", Folder.SpriteUI);
         }
         else
         {
-            OpType = OpType.Fertilizing;
+            OpType = OpType.Fertilize;
             OperateSr2.sprite = ManaReso.Load<Sprite>("Fertilize", Folder.SpriteUI);
         }
 
         if (sequence == 0)
         {
-            MarkAsFirst();
+            SetFirstOp();
         }
         else if (sequence == 1)
         {
-            MarkAsSecond();
+            SetSecondOp();
         }
         else
         {
-            MarkAsStandby();
+            SetThirdOp();
         }
     }
 
@@ -256,30 +277,12 @@ public class Flower : ObjRoot, IPointerClickHandler
 
     private void FullLevel()
     {
-        ManaReso.GetHudText("得分+1", Color.red, ChildDic["ScoreHudTra"]);
-        ManaMiniGame.GetScore(1);
-
-        GameReset();
+        
     }
 
     private void OnPhaseChange()
     {
-        if (Phase == 0)
-        {
-            PhaseTexm.text = "阶段0";
-        }
-        else if (Phase == 1)
-        {
-            PhaseTexm.text = "阶段1";
-        }
-        else if (Phase == 2)
-        {
-            PhaseTexm.text = "阶段2";
-        }
-        else if (Phase == 3)
-        {
-            FullLevel();
-        }
+        
     }
 
     #endregion
@@ -292,14 +295,14 @@ public class Flower : ObjRoot, IPointerClickHandler
 
         ManaGarden.SetFlowerCard(Id);
 
-        ManaReso.SetActive("H_Scrr", false);
+        ManaReso.SetActive("H_Grid", false);
         ManaReso.SetActive("H_Prev", false);
         ManaReso.SetActive("H_Next", false);
         ManaReso.SetActive("H_Place", false);
         ManaReso.SetActive("H_Icon1", true);
         ManaReso.SetActive("H_Retrieve", true);
 
-        ManaReso.Get("G_Flower").Forward(TweenType.CG);
-        ManaReso.Get("H_FlowerCard").Forward(TweenType.CG);
+        ManaReso.Get("G_Flower").TweenForCG();
+        ManaReso.Get("H_FlowerCard").TweenForCG();
     }
 }

+ 48 - 38
Assets/Script/Object/Garden.cs

@@ -62,15 +62,15 @@ public class Garden : MonoBehaviour, IDragHandler, IPointerClickHandler, IEndDra
 
         Transform tra0 = ManaReso.Get("Cloud1");
 
-        Tween tween = tra0.CreateTween(new Vector3(-12, tra0.position.y, tra0.position.z), 50f, false, true, Curve.Linear);
+        Tween tween = tra0.CreateTweenVec(new Vector3(-12, tra0.position.y, tra0.position.z), 50f, false, true, Curve.Linear);
 
         var tra1 = tra0;
         tween.OnForwardFinish += () =>
         {
-            tra1.Forward(TweenType.Vector);
+            tra1.TweenForVec();
         };
 
-        tra1.Forward(TweenType.Vector);
+        tra1.TweenForVec();
 
         #endregion
 
@@ -78,15 +78,15 @@ public class Garden : MonoBehaviour, IDragHandler, IPointerClickHandler, IEndDra
 
         tra0 = ManaReso.Get("Cloud2");
 
-        tween = tra0.CreateTween(new Vector3(-12, tra1.position.y, tra1.position.z), 75f, false, true, Curve.Linear);
+        tween = tra0.CreateTweenVec(new Vector3(-12, tra1.position.y, tra1.position.z), 75f, false, true, Curve.Linear);
 
         Transform tra2 = tra0;
         tween.OnForwardFinish += () =>
         {
-            tra2.Forward(TweenType.Vector);
+            tra2.TweenForVec();
         };
 
-        tra2.Forward(TweenType.Vector);
+        tra2.TweenForVec();
 
         #endregion
 
@@ -94,27 +94,27 @@ public class Garden : MonoBehaviour, IDragHandler, IPointerClickHandler, IEndDra
 
         tra0 = ManaReso.Get("Cloud3");
 
-        tween = tra0.CreateTween(new Vector3(-12, tra1.position.y, tra1.position.z), 100, false, true, Curve.Linear);
+        tween = tra0.CreateTweenVec(new Vector3(-12, tra1.position.y, tra1.position.z), 100, false, true, Curve.Linear);
 
         tween.OnForwardFinish += () =>
         {
-            tra0.Forward(TweenType.Vector);
+            tra0.TweenForVec();
         };
 
-        tra0.Forward(TweenType.Vector);
+        tra0.TweenForVec();
 
         #endregion
 
         #region GardenA
 
-        Move move = GardenA.CreateMove();
+        MoveVec moveVec = GardenA.CreateMoveVec();
 
-        move.OnStart += () =>
+        moveVec.OnStart += () =>
         {
             Flag2 = false;
         };
 
-        move.OnFinish += () =>
+        moveVec.OnFinish += () =>
         {
             Flag2 = true;
         };
@@ -123,7 +123,7 @@ public class Garden : MonoBehaviour, IDragHandler, IPointerClickHandler, IEndDra
 
         #region GardenGame
 
-        tween = ManaReso.Get("GardenGame").CreateTween
+        tween = ManaReso.Get("GardenGame").CreateTweenVec
         (
             ManaReso.Get("GardenGameTra").position,
             1f, 
@@ -165,14 +165,14 @@ public class Garden : MonoBehaviour, IDragHandler, IPointerClickHandler, IEndDra
 
         tween.OnBackwardFinish += () =>
         {
-            for (int i = 0; i < ManaMiniGame.IdleFlowerList.Count; i++)
+            for (int i = 0; i < ManaMiniGame.IdleList.Count; i++)
             {
-                ManaReso.Save(ManaMiniGame.IdleFlowerList[i]);
+                ManaReso.Save(ManaMiniGame.IdleList[i]);
             }
 
-            for (int i = 0; i < ManaMiniGame.OpFlowerList.Count; i++)
+            for (int i = 0; i < ManaMiniGame.OpList.Count; i++)
             {
-                ManaReso.Save(ManaMiniGame.OpFlowerList[i]);
+                ManaReso.Save(ManaMiniGame.OpList[i]);
             }
 
             ManaReso.SetActive("C_MiniGame", true);
@@ -302,7 +302,7 @@ public class Garden : MonoBehaviour, IDragHandler, IPointerClickHandler, IEndDra
         
         if (eventData.rawPointerPress.transform.name.Contains("FlowerTra"))
         {
-            FlowerCard flowerCard = ManaReso.Get<FlowerCard>("H_Scrr");
+            FlowerCard flowerCard = ManaReso.Get<FlowerCard>("H_FlowerCard");
             ManaGarden.SeleId = -1;
 
             for (int i = 1; i < ManaGarden.FlowerDic.Count + 1; i++)
@@ -318,11 +318,11 @@ public class Garden : MonoBehaviour, IDragHandler, IPointerClickHandler, IEndDra
 
             if (ManaGarden.SeleId == -1) //没有可种的花朵
             {
-                ManaReso.Get("G_Flower").Forward(TweenType.CG);
+                ManaReso.Get("G_Flower").TweenForCG();
             }
             else
             {
-                ManaReso.SetActive("H_Scrr", true);
+                ManaReso.SetActive("H_Grid", true);
                 ManaReso.SetActive("H_Prev", true);
                 ManaReso.SetActive("H_Next", true);
                 ManaReso.SetActive("H_Place", true);
@@ -331,9 +331,19 @@ public class Garden : MonoBehaviour, IDragHandler, IPointerClickHandler, IEndDra
                 ManaGarden.SeleFlowerTra = eventData.rawPointerPress.transform;
                 ManaGarden.SetFlowerCard(ManaGarden.SeleId);
 
-                ManaReso.Get("H_FlowerCard").Forward(TweenType.CG);
-
-                flowerCard.Select(0, true);
+                ManaReso.Get("H_FlowerCard").TweenForCG();
+
+                StartCoroutine
+                (Auxiliary.DelayCall
+                    (
+                        () =>
+                        {
+                            flowerCard.Select(0);
+                            ManaReso.Get<HorizontalLayoutGroup>("H_Grid").enabled = false;
+                        },
+                        1
+                    )
+                );
             }
         }
     } //点击土堆
@@ -341,11 +351,11 @@ public class Garden : MonoBehaviour, IDragHandler, IPointerClickHandler, IEndDra
 
     private void Return()
     {
-        Player.Move(PlayerPos[Page], 0.25f, Curve.EaseOutQuad);
-        GardenA.Move(GardenPosA[Page], 0.25f, Curve.EaseOutQuad);
-        GardenBk2.Move(GardenPosBk2[Page], 0.25f, Curve.EaseOutQuad);
-        GardenBk3.Move(GardenPosBk3[Page], 0.25f, Curve.EaseOutQuad);
-        GardenBk4.Move(GardenPosBk4[Page], 0.25f, Curve.EaseOutQuad);
+        Player.MoveVec(PlayerPos[Page], 0.25f, Curve.EaseOutQuad);
+        GardenA.MoveVec(GardenPosA[Page], 0.25f, Curve.EaseOutQuad);
+        GardenBk2.MoveVec(GardenPosBk2[Page], 0.25f, Curve.EaseOutQuad);
+        GardenBk3.MoveVec(GardenPosBk3[Page], 0.25f, Curve.EaseOutQuad);
+        GardenBk4.MoveVec(GardenPosBk4[Page], 0.25f, Curve.EaseOutQuad);
     }
 
     private void PrevPage()
@@ -354,11 +364,11 @@ public class Garden : MonoBehaviour, IDragHandler, IPointerClickHandler, IEndDra
         
         Flag1 = false;
 
-        Player.Move(PlayerPos[Page], 0.5f, Curve.EaseOutQuad);
-        GardenA.Move(GardenPosA[Page], 0.5f, Curve.EaseOutQuad);
-        GardenBk2.Move(GardenPosBk2[Page], 0.5f, Curve.EaseOutQuad);
-        GardenBk3.Move(GardenPosBk3[Page], 0.5f, Curve.EaseOutQuad);
-        GardenBk4.Move(GardenPosBk4[Page], 0.5f, Curve.EaseOutQuad);
+        Player.MoveVec(PlayerPos[Page], 0.5f, Curve.EaseOutQuad);
+        GardenA.MoveVec(GardenPosA[Page], 0.5f, Curve.EaseOutQuad);
+        GardenBk2.MoveVec(GardenPosBk2[Page], 0.5f, Curve.EaseOutQuad);
+        GardenBk3.MoveVec(GardenPosBk3[Page], 0.5f, Curve.EaseOutQuad);
+        GardenBk4.MoveVec(GardenPosBk4[Page], 0.5f, Curve.EaseOutQuad);
     }
 
     private void NextPage()
@@ -367,10 +377,10 @@ public class Garden : MonoBehaviour, IDragHandler, IPointerClickHandler, IEndDra
         
         Flag1 = false;
 
-        Player.Move(PlayerPos[Page], 0.5f, Curve.EaseOutQuad);
-        GardenA.Move(GardenPosA[Page], 0.5f, Curve.EaseOutQuad);
-        GardenBk2.Move(GardenPosBk2[Page], 0.5f, Curve.EaseOutQuad);
-        GardenBk3.Move(GardenPosBk3[Page], 0.5f, Curve.EaseOutQuad);
-        GardenBk4.Move(GardenPosBk4[Page], 0.5f, Curve.EaseOutQuad);
+        Player.MoveVec(PlayerPos[Page], 0.5f, Curve.EaseOutQuad);
+        GardenA.MoveVec(GardenPosA[Page], 0.5f, Curve.EaseOutQuad);
+        GardenBk2.MoveVec(GardenPosBk2[Page], 0.5f, Curve.EaseOutQuad);
+        GardenBk3.MoveVec(GardenPosBk3[Page], 0.5f, Curve.EaseOutQuad);
+        GardenBk4.MoveVec(GardenPosBk4[Page], 0.5f, Curve.EaseOutQuad);
     }
 }

+ 19 - 16
Assets/Script/Object/Hud/HudText.cs

@@ -8,36 +8,39 @@ public class HudText : ObjRoot
 {
     #region 变量
 
-    private float Speed;
-    private Text HudLab;
-
-    #endregion
-
-    private void Awake()
+    public Text Text
     {
-        Speed = 5f;
-        ObjType = ObjType.HudText;
+        get
+        {
+            if (_Text == null)
+            {
+                _Text = GetComponent<Text>();
+            }
 
-        HudLab = GetComponent<Text>();
+            return _Text;
+        }
+        set { _Text = value; }
     }
 
+    private Text _Text;
+
+    #endregion
 
     private void FixedUpdate()
     {
-        transform.position += new Vector3(0, Speed*Time.fixedDeltaTime, 0);
+        transform.position += new Vector3(0, 7.5f*Time.fixedDeltaTime, 0);
 
-        HudLab.SetAlpha(Mathf.Lerp(HudLab.color.a, 0, Time.fixedDeltaTime*2));
+        Text.SetAlpha(Mathf.Lerp(Text.color.a, 0, Time.fixedDeltaTime*2));
 
-        if (HudLab.color.a <= 0.05f)
+        if (Text.color.a <= 0.05f)
         {
             ManaReso.Save(gameObject);
         }
     }
 
-
-    public  void Set(string message, Color color)
+    public void Show(string str, Color color)
     {
-        HudLab.text = message;
-        HudLab.color = color;
+        Text.text = str;
+        Text.color = color;
     }
 }

+ 22 - 22
Assets/Script/Object/Skill/Ability.cs

@@ -49,33 +49,33 @@ public class Ability : SkillRoot
     protected float NewCoinPerson;
     protected double NewUpgradeAmt;
 
-    public SkillStatus ItemSkillStatus
+    public SkillStatus ItemStatus
     {
-        get { return _ItemSkillStatus; }
+        get { return _ItemStatus; }
         set
         {
-            _ItemSkillStatus = value;
+            _ItemStatus = value;
 
-            if (_ItemSkillStatus == SkillStatus.Lock)
+            if (_ItemStatus == SkillStatus.Lock)
             {
                 ItemBtnLab.text = string.Format("提前解锁\n等级{0}", UnlockLv);
             }
-            else if (_ItemSkillStatus == SkillStatus.UnLock)
+            else if (_ItemStatus == SkillStatus.UnLock)
             {
                 ItemBtnLab.text = string.Format("解锁");
             }
-            else if (_ItemSkillStatus == SkillStatus.Upgrade)
+            else if (_ItemStatus == SkillStatus.Upgrade)
             {
                 ItemBtnLab.text = string.Format("升级");
             }
             else
             {
-                throw new Exception(_ItemSkillStatus.ToString());
+                throw new Exception(_ItemStatus.ToString());
             }
         }
     }
 
-    protected SkillStatus _ItemSkillStatus;
+    protected SkillStatus _ItemStatus;
 
     #endregion
 
@@ -132,7 +132,7 @@ public class Ability : SkillRoot
         NewCoinPerson = CoinPerson;
         NewUpgradeAmt = UpgradeAmt;
 
-        if (ItemSkillStatus == SkillStatus.Upgrade)
+        if (ItemStatus == SkillStatus.Upgrade)
         {
             ManaLog.Log(string.Format("初始化<color=red>{0}</color> 等级 : {1}", Name, Level));
 
@@ -160,7 +160,7 @@ public class Ability : SkillRoot
         }
     }
 
-    public override void CollectOfflineCoin(int offlineCircle)
+    public override void CollectCoin(int offlineCircle)
     {
 
     }
@@ -174,7 +174,7 @@ public class Ability : SkillRoot
     {
         if (ManaData.Level >= UnlockLv) //到达解锁等级
         {
-            if (ItemSkillStatus == SkillStatus.Lock)
+            if (ItemStatus == SkillStatus.Lock)
             {
                 if (UnlockCur == Current.Free) //自动解锁
                 {
@@ -182,7 +182,7 @@ public class Ability : SkillRoot
                 }
                 else //付费解锁
                 {
-                    ItemSkillStatus = SkillStatus.UnLock;
+                    ItemStatus = SkillStatus.UnLock;
                 }
             }
         }
@@ -199,7 +199,7 @@ public class Ability : SkillRoot
 
             if (UpgradeCur != Current.Free) //升级类型
             {
-                ItemSkillStatus = SkillStatus.Upgrade;
+                ItemStatus = SkillStatus.Upgrade;
             }
             else
             {
@@ -212,7 +212,7 @@ public class Ability : SkillRoot
 
     protected void UnlockAhead()
     {
-        if (ItemSkillStatus != SkillStatus.Lock)
+        if (ItemStatus != SkillStatus.Lock)
         {
             ManaMessage.Show("您并不需要提前解锁", 1);
 
@@ -225,7 +225,7 @@ public class Ability : SkillRoot
 
             if (UpgradeCur != Current.Free) //升级类型
             {
-                ItemSkillStatus = SkillStatus.Upgrade;
+                ItemStatus = SkillStatus.Upgrade;
             }
             else
             {
@@ -241,10 +241,10 @@ public class Ability : SkillRoot
 
     protected void OnClick()
     {
-        ManaReso.Get("Fe_Info").Forward(TweenType.CG);
+        ManaReso.Get("Fe_Info").TweenForCG();
         ManaReso.SetText("Fe_Tit", Name);
 
-        if (ItemSkillStatus == SkillStatus.Lock)
+        if (ItemStatus == SkillStatus.Lock)
         {
             ManaReso.SetText("Fe_Lab0", "");
             ManaReso.SetText("Fe_Lab1", GetDescription(0));
@@ -256,11 +256,11 @@ public class Ability : SkillRoot
                 () =>
                 {
                     UnlockAhead();
-                    ManaReso.Get("Fe_Info").Backward(TweenType.CG);
+                    ManaReso.Get("Fe_Info").TweenBacCG();
                 }
             );
         }
-        else if (ItemSkillStatus == SkillStatus.UnLock)
+        else if (ItemStatus == SkillStatus.UnLock)
         {
             ManaReso.SetText("Fe_Lab0", "");
             ManaReso.SetText("Fe_Lab1", GetDescription(0));
@@ -272,11 +272,11 @@ public class Ability : SkillRoot
                 () =>
                 {
                     Unlock();
-                    ManaReso.Get("Fe_Info").Backward(TweenType.CG);
+                    ManaReso.Get("Fe_Info").TweenBacCG();
                 }
             );
         }
-        else if (ItemSkillStatus == SkillStatus.Upgrade)
+        else if (ItemStatus == SkillStatus.Upgrade)
         {
             ManaReso.SetText("Fe_Lab0", GetDescription(0));
             ManaReso.SetText("Fe_Lab1", GetDescription(1));
@@ -319,7 +319,7 @@ public class Ability : SkillRoot
 
             ManaLog.Log(string.Format("<color=red>{0}</color> 升级 : {1}", Name, Level));
 
-            if (ItemSkillStatus == SkillStatus.Use) //更新技能效果
+            if (ItemStatus == SkillStatus.Use) //更新技能效果
             {
                 Annul();
                 Effect();

+ 49 - 49
Assets/Script/Object/Skill/BigSkill.cs

@@ -22,27 +22,27 @@ public class BigSkill : Skill
     public Image BarBk1;
     public Button BarBtn;
 
-    public SkillStatus BarSkillStatus
+    public SkillStatus BarStatus
     {
-        get { return _BarSkillStatus; }
+        get { return _BarStatus; }
         set
         {
-            _BarSkillStatus = value;
+            _BarStatus = value;
 
-            if (_BarSkillStatus == SkillStatus.CD)
+            if (_BarStatus == SkillStatus.CD)
             {
                 BarBk0.SetActive(true);
                 BarBk1.SetActive(false);
                 
                 ManaData.CoolList.Add(this);
             }
-            else if (_BarSkillStatus == SkillStatus.Buy)
+            else if (_BarStatus == SkillStatus.Buy)
             {
                 if (Class != SkillClass.Null) //有技能条
                 {
                     #region MyRegion
 
-                    if (ItemSkillStatus == SkillStatus.Upgrade) //可以使用
+                    if (ItemStatus == SkillStatus.Upgrade) //可以使用
                     {
                         BarBk0.SetActive(false);
                         BarBk1.SetActive(true);
@@ -50,7 +50,7 @@ public class BigSkill : Skill
                         BarLab.text = "";
                         //BarLab.text = Name;
                     }
-                    else if (ItemSkillStatus == SkillStatus.Buy) //需要购买
+                    else if (ItemStatus == SkillStatus.Buy) //需要购买
                     {
                         BarBk0.SetActive(false);
                         BarBk1.SetActive(true);
@@ -81,9 +81,9 @@ public class BigSkill : Skill
                     #endregion
                 }
             }
-            else if (_BarSkillStatus == SkillStatus.Use)
+            else if (_BarStatus == SkillStatus.Use)
             {
-                ManaData.TimingList.Add(this);
+                ManaData.UsingList.Add(this);
             }
             else
             {
@@ -93,40 +93,40 @@ public class BigSkill : Skill
         }
     }
 
-    public new SkillStatus ItemSkillStatus
+    public new SkillStatus ItemStatus
     {
-        get { return _ItemSkillStatus; }
+        get { return _ItemStatus; }
         set
         {
-            _ItemSkillStatus = value;
+            _ItemStatus = value;
 
             if (Class == 0) //该技能不生成技能条
             {
                 return;
             }
 
-            if (_ItemSkillStatus == SkillStatus.Lock)
+            if (_ItemStatus == SkillStatus.Lock)
             {
                 ItemBtnLab.text = string.Format("提前解锁\n等级{0}", UnlockLv);
             }
-            else if (_ItemSkillStatus == SkillStatus.UnLock)
+            else if (_ItemStatus == SkillStatus.UnLock)
             {
                 ItemBtnLab.text = string.Format("解锁");
             }
-            else if (_ItemSkillStatus == SkillStatus.Upgrade)
+            else if (_ItemStatus == SkillStatus.Upgrade)
             {
                 ItemBtnLab.text = string.Format("升级");
 
-                BarSkillStatus = SkillStatus.Buy;
+                BarStatus = SkillStatus.Buy;
             }
             else
             {
-                throw new Exception();
+                throw new Exception(_ItemStatus.ToString());
             }
         }
     }
 
-    protected SkillStatus _BarSkillStatus;
+    protected SkillStatus _BarStatus;
 
     #endregion
 
@@ -142,17 +142,17 @@ public class BigSkill : Skill
 
     public override bool DoCool()
     {
-        CdTimer -= Time.deltaTime;
+        CoolTimer -= Time.deltaTime;
 
-        TimeSpan timeSpan = new TimeSpan(0, 0, 0, (int)CdTimer);
+        TimeSpan timeSpan = new TimeSpan(0, 0, 0, (int)CoolTimer);
 
         BarLab.text = string.Format("{0} : {1}", timeSpan.Minutes, timeSpan.Seconds);
 
-        BarBk0.fillAmount = (float)CdTimer / CD;
+        BarBk0.fillAmount = (float)CoolTimer / CD;
 
-        if (CdTimer <= 0)
+        if (CoolTimer <= 0)
         {
-            BarSkillStatus = SkillStatus.Buy;
+            BarStatus = SkillStatus.Buy;
 
             ManaData.CoolList.Remove(this);
 
@@ -206,13 +206,13 @@ public class BigSkill : Skill
             ItemBtn.onClick.AddListener(OnClick);
         }
 
-        if (ItemSkillStatus == SkillStatus.Upgrade)
+        if (ItemStatus == SkillStatus.Upgrade)
         {
             ManaLog.Log(string.Format("初始化<color=red>{0}</color> 等级 : {1}", Name, Level));
             ShowSkillBar();
         }
 
-        if (BarSkillStatus == SkillStatus.Use)
+        if (BarStatus == SkillStatus.Use)
         {
             ManaLog.Log(string.Format("初始化<color=red>{0}</color> 等级 : {1}", Name, Level));
             Effect();
@@ -222,7 +222,7 @@ public class BigSkill : Skill
 
     public override void ReceiveCool(float amt, bool isCurrent, bool isBuff)
     {
-        if (!ReduceCD || BarSkillStatus != SkillStatus.CD)
+        if (!ReduceCD || BarStatus != SkillStatus.CD)
         {
             return;
         }
@@ -231,11 +231,11 @@ public class BigSkill : Skill
         {
             if (isBuff) //按比例减少
             {
-                CdTimer -= CD * amt;
+                CoolTimer -= CD * amt;
             }
             else //按数值减少
             {
-                CdTimer -= amt;
+                CoolTimer -= amt;
             }
         }
         else //减少最大值
@@ -254,14 +254,14 @@ public class BigSkill : Skill
 
     private void ShowSkillBar()
     {
-        if (!ManaData.SkillBarValid)
+        if (!ManaData.SkillBar)
         {
             RectTransform skillBar = ManaReso.Get<RectTransform>("F_SkillBar");
             RectTransform gardenScrr = ManaReso.Get<RectTransform>("Fa_Scrr");
 
             gardenScrr.offsetMax += new Vector2(0, -skillBar.rect.height);
 
-            ManaData.SkillBarValid = true;
+            ManaData.SkillBar = true;
 
             if (ManaReso.Get("Fa_GardenTab").gameObject.activeSelf)
             {
@@ -283,28 +283,28 @@ public class BigSkill : Skill
     {
         if (ManaData.Connect == false)
         {
-            ManaUI.DisableBigSkill();
+
 
             return;
         }
 
-        if (BarSkillStatus == SkillStatus.Use)
+        if (BarStatus == SkillStatus.Use)
         {
             return;
         }
 
         if (ManaData.Pay(UseAmt, UseCur))
         {
-            CdTimer = CD * (1 + CdBuff);
-            EffectTimer = NewDuration;
+            CoolTimer = CD * (1 + CdBuff);
+            UsingTimer = NewDuration;
 
             if (Math.Abs(Duration) < 0.0005f)
             {
-                BarSkillStatus = SkillStatus.CD;
+                BarStatus = SkillStatus.CD;
             }
             else
             {
-                BarSkillStatus = SkillStatus.Use;
+                BarStatus = SkillStatus.Use;
                 BarLab.color = new Color(38/255f, 155/255f, 1, 1);
             }
 
@@ -385,13 +385,13 @@ public class BigSkill : Skill
         {
             ShowSkillBar();
 
-            BarSkillStatus = SkillStatus.Buy;
+            BarStatus = SkillStatus.Buy;
 
             if (Class != SkillClass.Null) //该技能有技能条
             {
                 if (UpgradeCur != Current.Free) //升级类型
                 {
-                    ItemSkillStatus = SkillStatus.Upgrade;
+                    ItemStatus = SkillStatus.Upgrade;
                 }
                 else
                 {
@@ -400,7 +400,7 @@ public class BigSkill : Skill
             }
             else
             {
-                ItemSkillStatus = SkillStatus.Buy;
+                ItemStatus = SkillStatus.Buy;
             }
 
             Data.SaveSkillList();
@@ -411,7 +411,7 @@ public class BigSkill : Skill
 
     protected override void UnlockAhead()
     {
-        if (ItemSkillStatus != SkillStatus.Lock)
+        if (ItemStatus != SkillStatus.Lock)
         {
             ManaMessage.Show("您并不需要提前解锁", 1);
 
@@ -420,13 +420,13 @@ public class BigSkill : Skill
 
         if (ManaData.Pay(UnlockAheadAmt, UnlockAheadCur))
         {
-            BarSkillStatus = SkillStatus.Buy;
+            BarStatus = SkillStatus.Buy;
 
-            ManaReso.Get("Fe_Info").Backward(TweenType.CG);
+            ManaReso.Get("Fe_Info").TweenBacCG();
 
             if (UpgradeCur != Current.Free) //升级类型
             {
-                ItemSkillStatus = SkillStatus.Upgrade;
+                ItemStatus = SkillStatus.Upgrade;
             }
             else
             {
@@ -465,7 +465,7 @@ public class BigSkill : Skill
 
             ManaLog.Log(string.Format("<color=red>{0}</color> 升级 : {1}", Name, Level));
 
-            if (BarSkillStatus == SkillStatus.Use) //更新技能效果
+            if (BarStatus == SkillStatus.Use) //更新技能效果
             {
                 Annul();
                 Effect();
@@ -479,7 +479,7 @@ public class BigSkill : Skill
     public override void Annul() //注销技能
     {
         BarLab.color = new Color(1, 1, 1, 1);
-        BarSkillStatus = SkillStatus.CD;
+        BarStatus = SkillStatus.CD;
 
         ManaData.SkillPlusPerm -= NewPlus;
         ManaData.SkillPerson -= NewPerson;
@@ -507,15 +507,15 @@ public class BigSkill : Skill
 
     public override bool DoTiming()
     {
-        EffectTimer -= Time.deltaTime;
+        UsingTimer -= Time.deltaTime;
 
-        BarLab.text = EffectTimer.ToString("0.0");
+        BarLab.text = UsingTimer.ToString("0.0");
 
-        if (EffectTimer <= 0)
+        if (UsingTimer <= 0)
         {
             Annul();
 
-            ManaData.TimingList.Remove(this);
+            ManaData.UsingList.Remove(this);
 
             return true;
         }

+ 14 - 14
Assets/Script/Object/Skill/Pack.cs

@@ -34,22 +34,22 @@ public class Pack : SkillRoot
 
     #endregion
 
-    protected SkillStatus _ItemSkillStatus;
+    protected SkillStatus _ItemStatus;
 
-    public SkillStatus ItemSkillStatus
+    public SkillStatus ItemStatus
     {
-        get { return _ItemSkillStatus; }
+        get { return _ItemStatus; }
         set
         {
-            _ItemSkillStatus = value;
+            _ItemStatus = value;
 
-            if (_ItemSkillStatus == SkillStatus.Buy)
+            if (_ItemStatus == SkillStatus.Buy)
             {
                 ItemBtn.interactable = true;
 
                 ItemBtnLab.text = string.Format("购买\n{0}{1}", UseCur, UseAmt);
             }
-            else if (_ItemSkillStatus == SkillStatus.Lock)
+            else if (_ItemStatus == SkillStatus.Lock)
             {
                 ItemBtn.interactable = false;
 
@@ -57,7 +57,7 @@ public class Pack : SkillRoot
             }
             else
             {
-                throw new Exception(_ItemSkillStatus.ToString());
+                throw new Exception(_ItemStatus.ToString());
             }
         }
     }
@@ -108,7 +108,7 @@ public class Pack : SkillRoot
         }
     }
 
-    public override void CollectOfflineCoin(int offlineCircle)
+    public override void CollectCoin(int offlineCircle)
     {
         
     }
@@ -122,17 +122,17 @@ public class Pack : SkillRoot
     {
         if (MaxUseLv == MinUseLv)
         {
-            ItemSkillStatus = SkillStatus.Buy;
+            ItemStatus = SkillStatus.Buy;
         }
         else
         {
             if (ManaData.Level > MaxUseLv || ManaData.Level < MinUseLv) //无法使用
             {
-                ItemSkillStatus = SkillStatus.Lock;
+                ItemStatus = SkillStatus.Lock;
             }
             else
             {
-                ItemSkillStatus = SkillStatus.Buy;
+                ItemStatus = SkillStatus.Buy;
             }
         }
     }
@@ -140,7 +140,7 @@ public class Pack : SkillRoot
 
     protected void OnClick()
     {
-        ManaReso.Get("Fe_Info").Forward(TweenType.CG);
+        ManaReso.Get("Fe_Info").TweenForCG();
         ManaReso.SetText("Fe_Tit", Name);
 
         if (MinUseLv != MaxUseLv) //有等级限制
@@ -153,7 +153,7 @@ public class Pack : SkillRoot
             ManaReso.SetActive("Fe_Lab0", false);
         }
 
-        if (ItemSkillStatus == SkillStatus.Buy)
+        if (ItemStatus == SkillStatus.Buy)
         {
             ManaReso.SetText("Fe_Lab1", GetDescription(0));
             ManaReso.SetText("Fe_BtnLab", string.Format("购买({0}{1})", UseCur, UseAmt));
@@ -164,7 +164,7 @@ public class Pack : SkillRoot
                 () =>
                 {
                     Use();
-                    ManaReso.Get("Fe_Info").Backward(TweenType.CG);
+                    ManaReso.Get("Fe_Info").TweenBacCG();
                 }
             );
         }

+ 49 - 49
Assets/Script/Object/Skill/Skill.cs

@@ -53,8 +53,8 @@ public class Skill : SkillRoot
 
     #endregion
 
-    public double CdTimer; //冷却计时
-    public double EffectTimer; //冷却计时
+    public double CoolTimer; //冷却计时
+    public double UsingTimer; //冷却计时
 
     protected float NewPlus;
     protected float NewPerson;
@@ -67,39 +67,39 @@ public class Skill : SkillRoot
     protected float NewCoinOnceBuff;
     protected double NewUpgradeAmt;
 
-    public SkillStatus ItemSkillStatus
+    public SkillStatus ItemStatus
     {
-        get { return _ItemSkillStatus; }
+        get { return _ItemStatus; }
         set
         {
-            _ItemSkillStatus = value;
+            _ItemStatus = value;
 
             if (Class == SkillClass.Null) //该技能不生成技能条
             {
                 return;
             }
 
-            if (_ItemSkillStatus == SkillStatus.CD)
+            if (_ItemStatus == SkillStatus.CD)
             {
                 ManaData.CoolList.Add(this);
             }
-            else if (_ItemSkillStatus == SkillStatus.Buy)
+            else if (_ItemStatus == SkillStatus.Buy)
             {
                 ItemBtnLab.text = string.Format("购买\n{0}{1}", UseCur, UseAmt);
             }
-            else if (_ItemSkillStatus == SkillStatus.Use)
+            else if (_ItemStatus == SkillStatus.Use)
             {
-                ManaData.TimingList.Add(this);
+                ManaData.UsingList.Add(this);
             }
-            else if (_ItemSkillStatus == SkillStatus.Lock)
+            else if (_ItemStatus == SkillStatus.Lock)
             {
                 ItemBtnLab.text = string.Format("提前解锁\n等级{0}", UnlockLv);
             }
-            else if (_ItemSkillStatus == SkillStatus.UnLock)
+            else if (_ItemStatus == SkillStatus.UnLock)
             {
                 ItemBtnLab.text = string.Format("解锁");
             }
-            else if (_ItemSkillStatus == SkillStatus.Upgrade)
+            else if (_ItemStatus == SkillStatus.Upgrade)
             {
                 ItemBtnLab.text = string.Format("升级");
             }
@@ -110,7 +110,7 @@ public class Skill : SkillRoot
         }
     }
 
-    protected SkillStatus _ItemSkillStatus;
+    protected SkillStatus _ItemStatus;
 
     #endregion
 
@@ -198,19 +198,19 @@ public class Skill : SkillRoot
         ItemLab.text = GetDescription(0);
         ItemBtn.onClick.AddListener(OnClick);
 
-        if (ItemSkillStatus != SkillStatus.Lock && ItemSkillStatus != SkillStatus.UnLock)
+        if (ItemStatus != SkillStatus.Lock && ItemStatus != SkillStatus.UnLock)
         {
             ManaLog.Log(string.Format("初始化<color=red>{0}</color> 等级 : {1}", Name, Level));
         }
 
-        if (ItemSkillStatus == SkillStatus.Use)
+        if (ItemStatus == SkillStatus.Use)
         {
             Effect();
             ItemBtnLab.color = new Color(38 / 255f, 155 / 255f, 1, 1);
         }
     } //读取配置时调用
 
-    public override void CollectOfflineCoin(int offlineCircle)
+    public override void CollectCoin(int offlineCircle)
     {
         float newPerson = ManaData.Person * NewPersonBuff + NewPerson;
         float newCoinPerson = ManaData.CoinPerson + NewCoinPerson;
@@ -221,15 +221,15 @@ public class Skill : SkillRoot
 
     public virtual bool DoCool()
     {
-        CdTimer -= Time.deltaTime;
+        CoolTimer -= Time.deltaTime;
 
-        TimeSpan timeSpan = new TimeSpan(0, 0, (int)CdTimer);
+        TimeSpan timeSpan = new TimeSpan(0, 0, (int)CoolTimer);
 
         ItemBtnLab.text = string.Format("冷却中\n剩余时间({0}:{1})", timeSpan.Minutes, timeSpan.Seconds);
 
-        if (CdTimer <= 0)
+        if (CoolTimer <= 0)
         {
-            ItemSkillStatus = SkillStatus.Buy;
+            ItemStatus = SkillStatus.Buy;
 
             ManaData.CoolList.Remove(this);
 
@@ -243,7 +243,7 @@ public class Skill : SkillRoot
 
     public override void ReceiveCool(float amt, bool isCurrent, bool isBuff)
     {
-        if (!ReduceCD && ItemSkillStatus == SkillStatus.CD)
+        if (!ReduceCD && ItemStatus == SkillStatus.CD)
         {
             return;
         }
@@ -252,11 +252,11 @@ public class Skill : SkillRoot
         {
             if (isBuff) //按比例减少
             {
-                CdTimer -= CD * amt;
+                CoolTimer -= CD * amt;
             }
             else //按数值减少
             {
-                CdTimer -= amt;
+                CoolTimer -= amt;
             }
         }
         else //减少最大值
@@ -276,7 +276,7 @@ public class Skill : SkillRoot
     {
         if (ManaData.Level >= UnlockLv) //到达解锁等级
         {
-            if (ItemSkillStatus == SkillStatus.Lock)
+            if (ItemStatus == SkillStatus.Lock)
             {
                 if (UnlockCur == Current.Free) //自动解锁
                 {
@@ -284,7 +284,7 @@ public class Skill : SkillRoot
                 }
                 else //付费解锁
                 {
-                    ItemSkillStatus = SkillStatus.UnLock;
+                    ItemStatus = SkillStatus.UnLock;
                 }
             }
         }
@@ -293,10 +293,10 @@ public class Skill : SkillRoot
 
     protected void OnClick()
     {
-        ManaReso.Get("Fe_Info").Forward(TweenType.CG);
+        ManaReso.Get("Fe_Info").TweenForCG();
         ManaReso.SetText("Fe_Tit", Name);
 
-        if (ItemSkillStatus == SkillStatus.Buy)
+        if (ItemStatus == SkillStatus.Buy)
         {
             ManaReso.SetText("Fe_Lab1", GetDescription(0));
             ManaReso.SetText("Fe_BtnLab", string.Format("购买({0}{1})", UseCur, UseAmt));
@@ -307,15 +307,15 @@ public class Skill : SkillRoot
                 () =>
                 {
                     Use();
-                    ManaReso.Get("Fe_Info").Backward(TweenType.CG);
+                    ManaReso.Get("Fe_Info").TweenBacCG();
                 }
             );
         }
-        else if (ItemSkillStatus == SkillStatus.Use)
+        else if (ItemStatus == SkillStatus.Use)
         {
 
         }
-        else if (ItemSkillStatus == SkillStatus.Lock)
+        else if (ItemStatus == SkillStatus.Lock)
         {
             ManaReso.SetText("Fe_Lab0", "");
             ManaReso.SetText("Fe_Lab1", GetDescription(0));
@@ -327,11 +327,11 @@ public class Skill : SkillRoot
                 () =>
                 {
                     UnlockAhead();
-                    ManaReso.Get("Fe_Info").Backward(TweenType.CG);
+                    ManaReso.Get("Fe_Info").TweenBacCG();
                 }
             );
         }
-        else if (ItemSkillStatus == SkillStatus.UnLock)
+        else if (ItemStatus == SkillStatus.UnLock)
         {
             ManaReso.SetText("Fe_Lab0", "");
             ManaReso.SetText("Fe_Lab1", GetDescription(0));
@@ -343,11 +343,11 @@ public class Skill : SkillRoot
                 () =>
                 {
                     Unlock();
-                    ManaReso.Get("Fe_Info").Backward(TweenType.CG);
+                    ManaReso.Get("Fe_Info").TweenBacCG();
                 }
             );
         }
-        else if (ItemSkillStatus == SkillStatus.Upgrade)
+        else if (ItemStatus == SkillStatus.Upgrade)
         {
             ManaReso.SetText("Fe_Lab0", GetDescription(0));
             ManaReso.SetText("Fe_Lab1", GetDescription(1));
@@ -394,7 +394,7 @@ public class Skill : SkillRoot
 
             ManaLog.Log(string.Format("<color=red>{0}</color> 升级 : {1}", Name, Level));
 
-            if (ItemSkillStatus == SkillStatus.Use) //更新技能效果
+            if (ItemStatus == SkillStatus.Use) //更新技能效果
             {
                 Annul();
                 Effect();
@@ -408,16 +408,16 @@ public class Skill : SkillRoot
     {
         if (ManaData.Pay(UseAmt, UseCur))
         {
-            CdTimer = CD * (1 + CdBuff);
-            EffectTimer = NewDuration;
+            CoolTimer = CD * (1 + CdBuff);
+            UsingTimer = NewDuration;
 
             if (Math.Abs(Duration) < 0.0005f)
             {
-                ItemSkillStatus = SkillStatus.CD;
+                ItemStatus = SkillStatus.CD;
             }
             else
             {
-                ItemSkillStatus = SkillStatus.Use;
+                ItemStatus = SkillStatus.Use;
                 ItemBtnLab.color = new Color(38/255f, 155/255f, 1, 1);
             }
 
@@ -498,11 +498,11 @@ public class Skill : SkillRoot
         {
             if (UseCur != Current.Free) //使用类型
             {
-                ItemSkillStatus = SkillStatus.Buy;
+                ItemStatus = SkillStatus.Buy;
             }
             else if (UpgradeCur != Current.Free) //升级类型
             {
-                ItemSkillStatus = SkillStatus.Upgrade;
+                ItemStatus = SkillStatus.Upgrade;
             }
             else
             {
@@ -517,7 +517,7 @@ public class Skill : SkillRoot
 
     protected virtual void UnlockAhead()
     {
-        if (ItemSkillStatus != SkillStatus.Lock)
+        if (ItemStatus != SkillStatus.Lock)
         {
             ManaMessage.Show("您并不需要提前解锁", 1);
 
@@ -528,11 +528,11 @@ public class Skill : SkillRoot
         {
             if (UseCur != Current.Free) //使用类型
             {
-                ItemSkillStatus = SkillStatus.Buy;
+                ItemStatus = SkillStatus.Buy;
             }
             else if (UpgradeCur != Current.Free) //升级类型
             {
-                ItemSkillStatus = SkillStatus.Upgrade;
+                ItemStatus = SkillStatus.Upgrade;
             }
             else
             {
@@ -573,7 +573,7 @@ public class Skill : SkillRoot
     public override void Annul() //注销技能
     {
         ItemBtnLab.color = new Color(1, 1, 1, 1);
-        ItemSkillStatus = SkillStatus.CD;
+        ItemStatus = SkillStatus.CD;
 
         ManaData.SkillPlusPerm -= NewPlus;
         ManaData.SkillPerson -= NewPerson;
@@ -601,15 +601,15 @@ public class Skill : SkillRoot
 
     public override bool DoTiming()
     {
-        EffectTimer -= Time.deltaTime;
+        UsingTimer -= Time.deltaTime;
 
-        ItemLab.text = EffectTimer.ToString("0.0");
+        ItemLab.text = UsingTimer.ToString("0.0");
 
-        if (EffectTimer <= 0)
+        if (UsingTimer <= 0)
         {
             Annul();
 
-            ManaData.TimingList.Remove(this);
+            ManaData.UsingList.Remove(this);
 
             return true;
         }

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

@@ -93,7 +93,7 @@ public abstract class SkillRoot : IComparable
     public abstract void Initialize();
     public abstract void ReceiveCool(float amt, bool isCurrent, bool isBuff); //接受技能冷却
     public abstract void OnLevelChange();
-    public abstract void CollectOfflineCoin(int offlineCircle);
+    public abstract void CollectCoin(int offlineCircle);
     public abstract bool DoTiming();
 
     #region 解读器

+ 3 - 64
Assets/Script/Tool/Anim/Move.cs

@@ -1,10 +1,9 @@
 using UnityEngine;
-using UnityEngine.Events;
 
-using System;
 using System.Collections;
+using UnityEngine.Events;
 
-public class Move 
+public abstract class Move 
 {
     #region 变量
 
@@ -12,67 +11,7 @@ public class Move
     public UnityAction OnStart;
     public UnityAction OnFinish;
 
-    protected float Timer;
-    protected float Duration;
-    protected Vector3 Delta;
-    protected Vector3 Origin;
-    protected Vector3 Destination;
-    protected Transform Target;
-
-    protected CurveFunctionV Func;
-
     #endregion
 
-    public Move(Transform target)
-    {
-        Target = target;
-    }
-
-
-    public bool DoMove()
-    {
-        if (Timer > Duration)
-        {
-            Target.position = Destination;
-
-            Timer = 0;
-
-            ManaAnim.MoveList.Remove(this);
-
-            if (OnFinish != null)
-            {
-                OnFinish.Invoke();
-            }
-
-            return true;
-        }
-        else
-        {
-            Target.position = Func(Timer, Duration, Origin, Delta);
-
-            Timer += Time.fixedDeltaTime;
-
-            return false;
-        }
-    }
-
-    public void StartMove(Vector3 destination, float duration, Curve curve)
-    {
-        Finish = false;
-        destination.z = Target.position.z;
-
-        Delta = destination - Target.position;
-        Origin = Target.position;
-        Duration = duration;
-        Destination = destination;
-
-        Func = ManaAnim.FunctionDicV[curve];
-
-        if (OnStart != null)
-        {
-            OnStart.Invoke();
-        }
-
-        ManaAnim.MoveList.Add(this);
-    }
+    public abstract bool DoMove();
 }

+ 2 - 2
Assets/Script/Tool/Anim/Move.cs.meta

@@ -1,6 +1,6 @@
 fileFormatVersion: 2
-guid: 15d25b48775dc7c4dbc614ce0c80df93
-timeCreated: 1488182161
+guid: 8231cf803f7d7c1408fd9470fb977135
+timeCreated: 1489628126
 licenseType: Pro
 MonoImporter:
   serializedVersion: 2

+ 4 - 2
Assets/Script/Tool/Anim/Tween.cs

@@ -28,7 +28,8 @@ public abstract class Tween
         IsBackwardFinish = false;
         OnForwardStart.Invoke();
 
-        ManaAnim.ForwardList.Add(this);
+        ManaAnim.TweenForList.Add(this);
+        //ManaAnim.TweenBacList.Remove(this);
     }
 
     public virtual void StartBackward()
@@ -37,6 +38,7 @@ public abstract class Tween
         IsBackwardFinish = false;
         OnBackwardStart.Invoke();
 
-        ManaAnim.BackwardList.Add(this);
+        ManaAnim.TweenBacList.Add(this);
+        //ManaAnim.TweenForList.Remove(this);
     }
 }

+ 2 - 2
Assets/Script/Tool/Anim/TweenCG.cs

@@ -64,7 +64,7 @@ public class TweenCG : Tween
             IsBackwardFinish = true;
             OnForwardFinish.Invoke();
 
-            ManaAnim.ForwardList.Remove(this);
+            ManaAnim.TweenForList.Remove(this);
             return true;
         }
         else
@@ -87,7 +87,7 @@ public class TweenCG : Tween
             IsForwardFinish = true;
             OnBackwardFinish.Invoke();
 
-            ManaAnim.BackwardList.Remove(this);
+            ManaAnim.TweenBacList.Remove(this);
             return true;
         }
         else

+ 0 - 97
Assets/Script/Tool/Anim/TweenGraphic.cs

@@ -1,97 +0,0 @@
-using UnityEngine;
-using UnityEngine.UI;
-
-using System.Collections;
-
-public class TweenGraphic : Tween 
-{
-    #region 变量
-
-    protected Color Delta;
-    protected Color Origin;
-    protected Color Destination;
-    protected Graphic Target;
-    protected CurveFunctionC Func;
-    
-    #endregion
-
-    public TweenGraphic(Graphic target, Color origin, Color destination, float duration, bool originActive, bool destActive, Curve curve)
-    {
-        Target = target;
-        Duration = duration;
-        DestActive = destActive;
-        OriginActive = originActive;
-
-        Delta = destination - origin;
-        Origin = origin;
-        Destination = destination;
-        
-        OnForwardStart += () =>
-        {
-            Target.SetActive(true);
-        };
-
-        OnForwardFinish += () =>
-        {
-            Target.SetActive(DestActive);
-        };
-
-        OnBackwardStart += () =>
-        {
-            Target.SetActive(true);
-        };
-
-        OnBackwardFinish += () =>
-        {
-            Target.SetActive(OriginActive);
-        };
-
-        Func = ManaAnim.FunctionDicC[curve];
-    }
-
-    public override bool DoForward()
-    {
-        if (Timer > Duration)
-        {
-            Target.color = Destination;
-
-            Timer = 0;
-            IsBackwardFinish = true;
-            OnForwardFinish.Invoke();
-
-            ManaAnim.ForwardList.Remove(this);
-            return true;
-        }
-        else
-        {
-            Target.color = Func(Timer, Duration, Origin, Delta);
-
-            Timer += Time.fixedDeltaTime;
-
-            return false;
-        }
-    }
-
-    public override bool DoBackward()
-    {
-        if (Timer > Duration)
-        {
-            Target.color = Origin;
-
-            Timer = 0;
-            IsForwardFinish = true;
-            OnBackwardFinish.Invoke();
-
-            ManaAnim.BackwardList.Remove(this);
-            return true;
-        }
-        else
-        {
-            Target.color = Func(Timer, Duration, Destination, new Color(-Delta.r, -Delta.g, -Delta.b, -Delta.a));
-
-            Timer += Time.fixedDeltaTime;
-
-            return false;
-        }
-    }
-}

+ 0 - 12
Assets/Script/Tool/Anim/TweenGraphic.cs.meta

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

+ 0 - 122
Assets/Script/Tool/Anim/TweenVector.cs

@@ -1,122 +0,0 @@
-using UnityEngine;
-
-using System;
-using System.Collections;
-
-public class TweenVector : Tween
-{
-    #region
-
-    protected Vector3 Delta;
-    protected Vector3 Origin;
-    protected Vector3 Destination;
-    protected Transform Target;
-    protected CanvasGroup CanvasGroup;
-    protected CurveFunctionV Func;
-
-    #endregion
-
-    public TweenVector(Transform target, Vector3 origin, Vector3 destination, float duration, bool originActive, bool destActive, Curve curve)
-    {
-        Target = target;
-        Duration = duration;
-        DestActive = destActive;
-        OriginActive = originActive;
-
-        Delta = destination - origin;
-        Origin = origin;
-        Destination = destination;
-
-        CanvasGroup = Target.GetComponent<CanvasGroup>();
-
-        OnForwardStart += () =>
-        {
-            Target.SetActive(true);
-
-            if (CanvasGroup != null)
-            {
-                CanvasGroup.interactable = false;
-            }
-        };
-
-        OnForwardFinish += () =>
-        {
-            Target.SetActive(DestActive);
-
-            if (CanvasGroup != null)
-            {
-                CanvasGroup.interactable = DestActive;
-            }
-        };
-
-        OnBackwardStart += () =>
-        {
-            Target.SetActive(true);
-
-            if (CanvasGroup != null)
-            {
-                CanvasGroup.interactable = false;
-            }
-        };
-
-        OnBackwardFinish += () =>
-        {
-            Target.SetActive(OriginActive);
-
-            if (CanvasGroup != null)
-            {
-                CanvasGroup.interactable = OriginActive;
-            }
-        };
-
-        Func = ManaAnim.FunctionDicV[curve];
-    }
-
-
-    public override bool DoForward()
-    {
-        if (Timer > Duration)
-        {
-            Target.position = Destination;
-
-            Timer = 0;
-            IsForwardFinish = true;
-            OnForwardFinish.Invoke();
-
-            ManaAnim.ForwardList.Remove(this);
-
-            return true;
-        }
-        else
-        {
-            Target.position = Func(Timer, Duration, Origin, Delta);
-
-            Timer += Time.fixedDeltaTime;
-
-            return false;
-        }
-    }
-
-    public override bool DoBackward()
-    {
-        if (Timer > Duration)
-        {
-            Target.position = Origin;
-
-            Timer = 0;
-            IsBackwardFinish = true;
-            OnBackwardFinish.Invoke();
-
-            ManaAnim.BackwardList.Remove(this);
-            return true;
-        }
-        else
-        {
-            Target.position = Func(Timer, Duration, Destination, -Delta);
-
-            Timer += Time.fixedDeltaTime;
-
-            return false;
-        }
-    }
-}

+ 0 - 12
Assets/Script/Tool/Anim/TweenVector.cs.meta

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

+ 19 - 5
Assets/Script/Tool/Auxiliary.cs

@@ -1,4 +1,6 @@
-using UnityEngine;
+using LitJson;
+
+using UnityEngine;
 using UnityEngine.UI;
 
 using System;
@@ -8,7 +10,7 @@ using System.Text;
 using System.Collections;
 using System.Collections.Generic;
 using System.Security.Cryptography;
-using LitJson;
+using UnityEngine.Events;
 
 public class Auxiliary : MonoBehaviour 
 {
@@ -43,10 +45,10 @@ public class Auxiliary : MonoBehaviour
 
     private void Start()
     {
-        
-    }
 
+    }
 
+    
     private void Update()
     {
         if (Input.GetKeyDown(KeyCode.P))
@@ -79,7 +81,6 @@ public class Auxiliary : MonoBehaviour
         }
     }
 
-
     public static byte[] Encrypt(string str)
     {
         byte[] bytes = Encoding.UTF8.GetBytes(str);
@@ -146,4 +147,17 @@ public class Auxiliary : MonoBehaviour
 
         return strB.ToString();
     }
+
+
+    public static IEnumerator DelayCall(UnityAction function, int frame)
+    {
+        int count = 0;
+
+        if (count++ < frame)
+        {
+            yield return null;
+        }
+
+        function.Invoke();
+    }
 }

+ 9 - 9
Assets/Script/Tool/Data.cs

@@ -66,16 +66,16 @@ public class Data
                 xmlAttribute.Value = skill.SkillCato.ToString();
 
                 xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("ItemStatus"));
-                xmlAttribute.Value = skill.ItemSkillStatus.ToString();
+                xmlAttribute.Value = skill.ItemStatus.ToString();
 
                 xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("Level"));
                 xmlAttribute.Value = skill.Level.ToString();
 
                 xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("CdTimer"));
-                xmlAttribute.Value = skill.CdTimer.ToString();
+                xmlAttribute.Value = skill.CoolTimer.ToString();
 
                 xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("EffectTimer"));
-                xmlAttribute.Value = skill.EffectTimer.ToString();
+                xmlAttribute.Value = skill.UsingTimer.ToString();
 
                 xmlNode = PlayerNode.SelectSingleNode("SkillList");
 
@@ -96,7 +96,7 @@ public class Data
                 xmlAttribute.Value = pack.Name;
 
                 xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("ItemStatus"));
-                xmlAttribute.Value = pack.ItemSkillStatus.ToString();
+                xmlAttribute.Value = pack.ItemStatus.ToString();
 
                 xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("Level"));
                 xmlAttribute.Value = pack.Level.ToString();
@@ -117,7 +117,7 @@ public class Data
                 xmlAttribute.Value = ability.SkillCato.ToString();
 
                 xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("ItemStatus"));
-                xmlAttribute.Value = ability.ItemSkillStatus.ToString();
+                xmlAttribute.Value = ability.ItemStatus.ToString();
 
                 xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("Level"));
                 xmlAttribute.Value = ability.Level.ToString();
@@ -138,19 +138,19 @@ public class Data
                 xmlAttribute.Value = bigSkill.SkillCato.ToString();
 
                 xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("ItemStatus"));
-                xmlAttribute.Value = bigSkill.ItemSkillStatus.ToString();
+                xmlAttribute.Value = bigSkill.ItemStatus.ToString();
 
                 xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("BarStatus"));
-                xmlAttribute.Value = bigSkill.BarSkillStatus.ToString();
+                xmlAttribute.Value = bigSkill.BarStatus.ToString();
 
                 xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("Level"));
                 xmlAttribute.Value = bigSkill.Level.ToString();
 
                 xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("CdTimer"));
-                xmlAttribute.Value = bigSkill.CdTimer.ToString();
+                xmlAttribute.Value = bigSkill.CoolTimer.ToString();
 
                 xmlAttribute = xmlNode.Attributes.Append(PlayerDoc.CreateAttribute("EffectTimer"));
-                xmlAttribute.Value = bigSkill.EffectTimer.ToString();
+                xmlAttribute.Value = bigSkill.UsingTimer.ToString();
 
                 xmlNode = PlayerNode.SelectSingleNode("SkillList");
 

+ 121 - 38
Assets/Script/Tool/Extension.cs

@@ -1,6 +1,7 @@
 using UnityEngine;
 using UnityEngine.UI;
 
+using System;
 using System.Collections;
 using System.Collections.Generic;
 
@@ -8,19 +9,36 @@ public static class Extension
 {
     #region Move
 
-    public static void Move(this Component component, Vector3 destination, float duration, Curve curve)
+    public static void MoveVec(this Component comp, Vector3 destination, float duration, Curve curve)
     {
-        ManaAnim.Move(component.transform, destination, duration, curve);
+        ManaAnim.MoveVec(comp.transform, destination, duration, curve);
     }
 
-    public static Move GetMove(this Component component)
+    public static void MoveScror(this Component comp, float destination, float duration, Curve curve)
     {
-        return ManaAnim.GetMove(component.transform);
+        ManaAnim.MoveScrr(comp.transform, destination, duration, curve);
     }
 
-    public static Move CreateMove(this Component component)
+
+    public static MoveVec GetMoveVec(this Component comp)
+    {
+        return ManaAnim.GetMoveVec(comp.transform);
+    }
+
+    public static MoveVec CreateMoveVec(this Component comp)
+    {
+        return ManaAnim.CreateMoveVec(comp.transform);
+    }
+
+
+    public static MoveScrr GetMoveScrr(this Component comp)
+    {
+        return ManaAnim.GetMoveScrr(comp.transform);
+    }
+
+    public static MoveScrr CreateMoveScrr(this Component comp)
     {
-        return ManaAnim.CreateMove(component.transform);
+        return ManaAnim.CreateMoveScrr(comp.transform);
     }
 
     #endregion
@@ -46,9 +64,9 @@ public static class Extension
 
     #region Sprite
 
-    public static Sprite GetSprite(this Component component)
+    public static Sprite GetSprite(this Component comp)
     {
-        return component.GetComponent<Image>().sprite;
+        return comp.GetComponent<Image>().sprite;
     }
 
     #endregion
@@ -73,70 +91,121 @@ public static class Extension
 
     #region Active
 
-    public static void SetActive(this Component component, bool active)
+    public static void SetActive(this Component comp, bool active)
     {
-        component.gameObject.SetActive(active);
+        comp.gameObject.SetActive(active);
     }
 
     #endregion
 
     #region Tween
 
-    public static void Forward(this Component component, TweenType tweenType)
+    public static void TweenForCG(this Component comp)
     {
-        ManaAnim.Forward(component.transform, tweenType);
+        ManaAnim.TweenForCG(comp.transform);
     }
 
-    public static void Backward(this Component component, TweenType tweenType)
+    public static void TweenForVec(this Component comp)
     {
-        ManaAnim.Backward(component.transform, tweenType);
+        ManaAnim.TweenForVec(comp.transform);
     }
 
-    public static bool IsForwardFinish(this Component component, TweenType tweenType)
+    public static void TweenForGra(this Component comp)
     {
-        return component.transform.GetTween(tweenType).IsForwardFinish;
+        ManaAnim.TweenForGra(comp.transform);
     }
 
-    public static bool IsBackwardFinish(this Component component, TweenType tweenType)
+    public static void TweenForScale(this Component comp)
     {
-        return component.transform.GetTween(tweenType).IsBackwardFinish;
+        ManaAnim.TweenForScale(comp.transform);
     }
 
-    public static Tween GetTween(this Component component, TweenType tweenType)
+
+
+    public static void TweenBacCG(this Component comp)
     {
-        return ManaAnim.GetTween(component.transform, tweenType);
+        ManaAnim.TweenBacCG(comp.transform);
     }
 
-    public static Tween CreateTween(this Component component, float origin, float destination, float duration, bool originActive, bool destActive, Curve curve)
+    public static void TweenBacVec(this Component comp)
     {
-        return ManaAnim.CreateTween(component.transform, origin, destination, duration, originActive, destActive, curve);
+        ManaAnim.TweenBacVec(comp.transform);
     }
 
-    public static Tween CreateTween(this Component component, float destination, float duration, bool originActive, bool destActive, Curve curve)
+    public static void TweenBacGra(this Component comp)
     {
-        return ManaAnim.CreateTween(component.transform, destination, duration, originActive, destActive, curve);
+        ManaAnim.TweenBacGra(comp.transform);
     }
 
-    public static Tween CreateTween(this Component component, Color origin, Color destination, float duration, bool originActive, bool destActive, Curve curve)
+    public static void TweenBacScale(this Component comp)
     {
-        return ManaAnim.CreateTween(component.transform, origin, destination, duration, originActive, destActive, curve);
+        ManaAnim.TweenBacScale(comp.transform);
     }
 
-    public static Tween CreateTween(this Component component, Color destination, float duration, bool originActive, bool destActive, Curve curve)
+
+    public static TweenCG GetTweenCG(this Component comp)
     {
-        return ManaAnim.CreateTween(component.transform, destination, duration, originActive, destActive, curve);
+        return ManaAnim.GetTweenCG(comp.transform);
     }
 
-    public static Tween CreateTween(this Component component, Vector3 origin, Vector3 destination, float duration, bool originActive, bool destActive, Curve curve)
+    public static TweenVec GetTweenVec(this Component comp)
     {
-        return ManaAnim.CreateTween(component.transform, origin, destination, duration, originActive, destActive, curve);
+        return ManaAnim.GetTweenVec(comp.transform);
     }
 
-    public static Tween CreateTween(this Component component, Vector3 destination, float duration, bool originActive, bool destActive, Curve curve)
+    public static TweenGra GetTweenGra(this Component comp)
     {
-        return ManaAnim.CreateTween(component.transform, destination, duration, originActive, destActive, curve);
+        return ManaAnim.GetTweenGra(comp.transform);
     }
 
+    public static TweenScale GetTweenScale(this Component comp)
+    {
+        return ManaAnim.GetTweenScale(comp.transform);
+    }
+
+
+
+    public static TweenCG CreateTweenCG(this Component comp, float origin, float destination, float duration, bool originActive, bool destActive, Curve curve)
+    {
+        return ManaAnim.CreateTweenCG(comp.transform, origin, destination, duration, originActive, destActive, curve);
+    }
+
+    public static TweenCG CreateTweenCG(this Component comp, float destination, float duration, bool originActive, bool destActive, Curve curve)
+    {
+        return ManaAnim.CreateTweenCG(comp.transform, destination, duration, originActive, destActive, curve);
+    }
+
+    public static TweenGra CreateTweenGra(this Component comp, Color origin, Color destination, float duration, bool originActive, bool destActive, Curve curve)
+    {
+        return ManaAnim.CreateTweenGra(comp.transform, origin, destination, duration, originActive, destActive, curve);
+    }
+
+    public static TweenGra CreateTweenGra(this Component comp, Color destination, float duration, bool originActive, bool destActive, Curve curve)
+    {
+        return ManaAnim.CreateTweenGra(comp.transform, destination, duration, originActive, destActive, curve);
+    }
+
+    public static TweenVec CreateTweenVec(this Component comp, Vector3 origin, Vector3 destination, float duration, bool originActive, bool destActive, Curve curve)
+    {
+        return ManaAnim.CreateTweenVec(comp.transform, origin, destination, duration, originActive, destActive, curve);
+    }
+
+    public static TweenVec CreateTweenVec(this Component comp, Vector3 destination, float duration, bool originActive, bool destActive, Curve curve)
+    {
+        return ManaAnim.CreateTweenVec(comp.transform, destination, duration, originActive, destActive, curve);
+    }
+
+    public static TweenScale CreateTweenScale(this Component comp, Vector3 origin, Vector3 destination, float duration, bool originActive, bool destActive, Curve curve)
+    {
+        return ManaAnim.CreateTweenScale(comp.transform, origin, destination, duration, originActive, destActive, curve);
+    }
+
+    public static TweenScale CreateTweenScale(this Component comp, Vector3 destination, float duration, bool originActive, bool destActive, Curve curve)
+    {
+        return ManaAnim.CreateTweenScale(comp.transform, destination, duration, originActive, destActive, curve);
+    }
+
+
     #endregion
 
     #region Collider
@@ -146,9 +215,9 @@ public static class Extension
         gameObject.GetComponent<BoxCollider2D>().enabled = active;
     }
 
-    public static void SetCollider(this Component component, bool active)
+    public static void SetCollider(this Component comp, bool active)
     {
-        BoxCollider2D collider = component.GetComponent<BoxCollider2D>();
+        BoxCollider2D collider = comp.GetComponent<BoxCollider2D>();
 
         if (collider)
         {
@@ -165,18 +234,32 @@ public static class Extension
         return gameObject.transform.GetChild(index);
     }
 
-    public static Transform GetChild(this Component component, int index)
+    public static Transform GetChild(this Component comp, int index)
+    {
+        return comp.transform.GetChild(index);
+    }
+
+    #endregion
+
+    #region SetParent
+
+    public static void SetParent(this Component comp, Transform par)
+    {
+        comp.transform.SetParent(par);
+    }
+
+    public static void SetParent(this GameObject go, Transform par)
     {
-        return component.transform.GetChild(index);
+        go.transform.SetParent(par);
     }
 
     #endregion
 
     #region AddComponent
 
-    public static T AddComponent<T>(this Component component) where T : Component
+    public static T AddComponent<T>(this Component comp) where T : Component
     {
-        return component.transform.gameObject.AddComponent<T>();
+        return comp.transform.gameObject.AddComponent<T>();
     }
 
     #endregion

+ 22 - 82
Assets/Script/Tool/UI/FlowerCard.cs

@@ -9,38 +9,19 @@ public class FlowerCard : MonoBehaviour
 {
 	#region 变量
 
-    public int ViewAmt;
-    public int ViewIndex;
-    public int SelectIndex;
+    public int SelectIndex = -1;
 
-    private int ItemAmt;
-    private ScrollRect ScrollRect;
-    private Transform SeleItem;
-    private List<Transform> ItemList;
-    private List<FlowerInfo> InfoList;
+    public Transform SeleItem;
+    public List<Transform> ItemList = new List<Transform>();
+    public List<FlowerInfo> InfoList = new List<FlowerInfo>();
 
     #endregion
 
-    private void Awake()
-	{
-        ScrollRect = transform.GetComponent<ScrollRect>();
-	    ViewIndex = 0;
-	}
-
-
     public void Add(FlowerInfo flowerInfo)
     {
-        if (InfoList == null)
-        {
-            InfoList = new List<FlowerInfo>();
-        }
+        Transform tra = ManaReso.GetFlowerCardItem();
 
-        if (ItemList == null)
-        {
-            ItemList = new List<Transform>();
-        }
-
-        Transform tra = ManaReso.GetFlowerItem();
+        tra.CreateTweenScale(new Vector3(1.5f, 1.5f, 1), 0.25f, true, true, Curve.EaseOutQuad);
 
         Image image = tra.transform.GetChild(0).GetComponent<Image>();
 
@@ -64,49 +45,28 @@ public class FlowerCard : MonoBehaviour
         ItemList.Add(tra);
     }
 
-    public void Select(int index, bool move)
+    public void Select(int index)
     {
-        SelectIndex = index;
-
-        if (SeleItem != null)
+        if (SeleItem != null && SelectIndex != index)
         {
-            SeleItem.GetChild(1).SetActive(false);
+            SeleItem.TweenBacScale();
         }
 
-        SeleItem = ItemList[index];
-        SeleItem.GetChild(1).SetActive(true);
-
-        ManaGarden.SetFlowerCard(InfoList[index].Id);
-
-        if (move)
+        if (SelectIndex != index)
         {
-            if (SelectIndex > ItemList.Count - ViewAmt)
-            {
-                ViewIndex = ItemList.Count - ViewAmt;
-            }
-            else if (SelectIndex == 0)
-            {
-                ViewIndex = SelectIndex;
-            }
-            else
-            {
-                ViewIndex = SelectIndex - 1;
-            }
-
-            ItemAmt = ScrollRect.content.childCount;
+            SelectIndex = index;
 
-            float divisor = (ItemAmt - ViewAmt);
+            SeleItem = ItemList[index];
+            SeleItem.TweenForScale();
+            SeleItem.transform.SetAsLastSibling();
 
-            if (divisor > 0)
-            {
-                ScrollRect.horizontalNormalizedPosition = ViewIndex / divisor;
-            }
+            ManaGarden.SetFlowerCard(InfoList[index].Id);
         }
     }
 
     public void Select(Transform item)
     {
-        Select(ItemList.IndexOf(item), true);
+        Select(ItemList.IndexOf(item));
     }
 
     public void Close()
@@ -118,30 +78,22 @@ public class FlowerCard : MonoBehaviour
 
         for (int i = 0; i < ItemList.Count; i++)
         {
+            ItemList[i].TweenBacScale();
             ManaReso.Save(ItemList[i]);
         }
 
         InfoList = new List<FlowerInfo>();
         ItemList = new List<Transform>();
+        SelectIndex = -1;
+
+        ManaReso.Get<HorizontalLayoutGroup>("H_Grid").enabled = true;
     }
 
     public void PrevItem()
     {
         if (SelectIndex > 0)
         {
-            Select(--SelectIndex, false);
-        }
-
-        if (ViewIndex > 0)
-        {
-            ItemAmt = ScrollRect.content.childCount;
-
-            float divisor = (ItemAmt - ViewAmt);
-
-            if (divisor > 0)
-            {
-                ScrollRect.horizontalNormalizedPosition = --ViewIndex / divisor;
-            }
+            Select(SelectIndex - 1);
         }
     }
 
@@ -149,19 +101,7 @@ public class FlowerCard : MonoBehaviour
     {
         if (SelectIndex < ItemList.Count - 1)
         {
-            Select(++SelectIndex, false);
-        }
-
-        if (ViewIndex < ItemList.Count - ViewAmt)
-        {
-            ItemAmt = ScrollRect.content.childCount;
-
-            float divisor = (ItemAmt - ViewAmt);
-
-            if (divisor > 0)
-            {
-                ScrollRect.horizontalNormalizedPosition = ++ViewIndex/divisor;
-            }
+            Select(SelectIndex + 1);
         }
     } 
 }

+ 10 - 2
MyLovelyGarden.csproj

@@ -120,15 +120,23 @@
     <Compile Include="Assets\Script\Object\Skill\Skill.cs" />
     <Compile Include="Assets\Script\Object\Skill\SkillRoot.cs" />
     <Compile Include="Assets\Script\Tool\Anim\Move.cs" />
+    <Compile Include="Assets\Script\Tool\Anim\MoveScrr.cs" />
+    <Compile Include="Assets\Script\Tool\Anim\MoveVec.cs" />
     <Compile Include="Assets\Script\Tool\Anim\Tween.cs" />
     <Compile Include="Assets\Script\Tool\Anim\TweenCG.cs" />
-    <Compile Include="Assets\Script\Tool\Anim\TweenGraphic.cs" />
-    <Compile Include="Assets\Script\Tool\Anim\TweenVector.cs" />
+    <Compile Include="Assets\Script\Tool\Anim\TweenGra.cs" />
+    <Compile Include="Assets\Script\Tool\Anim\TweenScale.cs" />
+    <Compile Include="Assets\Script\Tool\Anim\TweenVec.cs" />
     <Compile Include="Assets\Script\Tool\Auxiliary.cs" />
     <Compile Include="Assets\Script\Tool\Data.cs" />
+    <Compile Include="Assets\Script\Tool\DateUtil.cs" />
+    <Compile Include="Assets\Script\Tool\DecryptionUtil.cs" />
     <Compile Include="Assets\Script\Tool\DelayCall.cs" />
     <Compile Include="Assets\Script\Tool\Extension.cs" />
     <Compile Include="Assets\Script\Tool\Language.cs" />
+    <Compile Include="Assets\Script\Tool\UI\FlowerCard.cs" />
+    <Compile Include="Assets\Script\Tool\URLRequest.cs" />
+    <Compile Include="Assets\Script\Tool\URLRequestData.cs" />
     <Compile Include="Assets\Script\Utils\DGFileUtil.cs" />
     <Compile Include="Assets\Script\Utils\JsonUtil.cs" />
     <Compile Include="Assets\Script\Utils\MD5Util.cs" />

+ 13 - 16
MyLovelyGarden.sln

@@ -1,9 +1,9 @@
-Microsoft Visual Studio Solution File, Format Version 11.00
-# Visual Studio 2008
-
-Project("{8A8BB0A8-D809-F2DF-89D6-F26151FFF558}") = "MyLovelyGarden", "Assembly-CSharp.csproj", "{21BB93BC-2239-D8F5-1219-201F8DCBAF49}"
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2015
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyLovelyGarden", "MyLovelyGarden.csproj", "{9F3A3259-D53B-F6C8-8878-C5B99621035A}"
 EndProject
-Project("{8A8BB0A8-D809-F2DF-89D6-F26151FFF558}") = "MyLovelyGarden", "Assembly-CSharp-Editor.csproj", "{A08052E5-32CE-91C0-FF56-C60C901D6BEF}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyLovelyGarden.Editor", "MyLovelyGarden.Editor.csproj", "{B575449E-FD9A-1672-368B-EC1E1252F6E4}"
 EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -11,19 +11,16 @@ Global
 		Release|Any CPU = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
-		{21BB93BC-2239-D8F5-1219-201F8DCBAF49}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{21BB93BC-2239-D8F5-1219-201F8DCBAF49}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{21BB93BC-2239-D8F5-1219-201F8DCBAF49}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{21BB93BC-2239-D8F5-1219-201F8DCBAF49}.Release|Any CPU.Build.0 = Release|Any CPU
-		{A08052E5-32CE-91C0-FF56-C60C901D6BEF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{A08052E5-32CE-91C0-FF56-C60C901D6BEF}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{A08052E5-32CE-91C0-FF56-C60C901D6BEF}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{A08052E5-32CE-91C0-FF56-C60C901D6BEF}.Release|Any CPU.Build.0 = Release|Any CPU
+		{9F3A3259-D53B-F6C8-8878-C5B99621035A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{9F3A3259-D53B-F6C8-8878-C5B99621035A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{9F3A3259-D53B-F6C8-8878-C5B99621035A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{9F3A3259-D53B-F6C8-8878-C5B99621035A}.Release|Any CPU.Build.0 = Release|Any CPU
+		{B575449E-FD9A-1672-368B-EC1E1252F6E4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{B575449E-FD9A-1672-368B-EC1E1252F6E4}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{B575449E-FD9A-1672-368B-EC1E1252F6E4}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{B575449E-FD9A-1672-368B-EC1E1252F6E4}.Release|Any CPU.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
 	EndGlobalSection
-	GlobalSection(MonoDevelopProperties) = preSolution
-		StartupItem = Assembly-CSharp.csproj
-	EndGlobalSection
 EndGlobal

+ 11 - 3
MyLovelyGarden.txt

@@ -1,8 +1,16 @@
-图文混排
+没有连接网络时禁用技能
+
+删掉ManaMessage 给ManaLog增加一个渐影效果
+
+增加一个调试面板(能够查看正在使用的技能 周期计时 Person与CoinPerson等)
 
-服务器框架
+PageView改ListView
 
-提取PageView
+throw new exception输入到调试面板中
+
+所有弹窗界面加上180透明度黑色背景
+
+图文混排
 
 
 Anchor