Browse Source

Merge branch 'master' of http://git.dashgame.com/gsgundam/garden_client

gsgundam 8 years ago
parent
commit
80484f2e3e
70 changed files with 1201 additions and 1099 deletions
  1. BIN
      .vs/MyLovelyGarden/v14/.suo
  2. BIN
      Assets/Resource/Animations/Logo.anim
  3. BIN
      Assets/Resource/DebugMode.prefab
  4. 8 0
      Assets/Resource/DebugMode.prefab.meta
  5. BIN
      Assets/Resource/Logo.unity
  6. BIN
      Assets/Resource/Prefab/Object/Garden.prefab
  7. BIN
      Assets/Resource/Prefab/PrefabUI/GroupA.prefab
  8. BIN
      Assets/Resource/Prefab/PrefabUI/GroupB.prefab
  9. 2 2
      Assets/Resource/Sprite/Garden/技能树1.png.meta
  10. 2 2
      Assets/Resource/Sprite/Garden/技能添加彩虹.png.meta
  11. 1 1
      Assets/Resource/XML/Config/skill_config.xml
  12. 2 2
      Assets/Resource/XML/PlayerConfig.xml
  13. BIN
      Assets/Resource/Xlsx/language_config.xlsx
  14. 5 0
      Assets/Script/Editor/EditorAuxiliary.cs
  15. 54 13
      Assets/Script/Editor/EditorBundle.cs
  16. 23 5
      Assets/Script/Manage/Initializer.cs
  17. 210 186
      Assets/Script/Manage/ManaAchieve.cs
  18. 76 349
      Assets/Script/Manage/ManaAnim.cs
  19. 65 23
      Assets/Script/Manage/ManaData.cs
  20. 2 2
      Assets/Script/Manage/ManaGarden.cs
  21. 1 4
      Assets/Script/Manage/ManaIAP.cs
  22. 1 1
      Assets/Script/Manage/ManaInfo.cs
  23. 1 1
      Assets/Script/Manage/ManaLan.cs
  24. 5 5
      Assets/Script/Manage/ManaServer.cs
  25. 1 1
      Assets/Script/Manage/ManaTutorial.cs
  26. 28 26
      Assets/Script/Manage/ManaUI.cs
  27. 18 5
      Assets/Script/Manage/ManaVisit.cs
  28. 1 1
      Assets/Script/Object/Elf.cs
  29. 5 0
      Assets/Script/Object/Flower.cs
  30. 32 30
      Assets/Script/Object/Skill/Ability.cs
  31. 5 5
      Assets/Script/Object/Skill/BigSkill.cs
  32. 1 1
      Assets/Script/Object/Skill/Pack.cs
  33. 25 7
      Assets/Script/Object/Skill/Skill.cs
  34. 13 0
      Assets/Script/Object/Skill/SkillRoot.cs
  35. 25 25
      Assets/Script/Object/Tutorial.cs
  36. 4 4
      Assets/Script/Tool/Anim/Move.cs
  37. 8 8
      Assets/Script/Tool/Anim/Move2D.cs
  38. 8 8
      Assets/Script/Tool/Anim/Move3D.cs
  39. 5 5
      Assets/Script/Tool/Anim/Shake.cs
  40. 2 4
      Assets/Script/Tool/Anim/StreamFont.cs
  41. 3 5
      Assets/Script/Tool/Anim/StreamScale.cs
  42. 42 19
      Assets/Script/Tool/Anim/Tween.cs
  43. 2 10
      Assets/Script/Tool/Anim/TweenAudio.cs
  44. 2 10
      Assets/Script/Tool/Anim/TweenCG.cs
  45. 2 10
      Assets/Script/Tool/Anim/TweenFont.cs
  46. 2 10
      Assets/Script/Tool/Anim/TweenGra.cs
  47. 2 10
      Assets/Script/Tool/Anim/TweenNumber.cs
  48. 6 10
      Assets/Script/Tool/Anim/TweenOutline.cs
  49. 4 12
      Assets/Script/Tool/Anim/TweenRect.cs
  50. 4 12
      Assets/Script/Tool/Anim/TweenScale.cs
  51. 92 42
      Assets/Script/Tool/Anim/TweenSr.cs
  52. 4 12
      Assets/Script/Tool/Anim/TweenVec.cs
  53. 62 2
      Assets/Script/Tool/Auxiliary.cs
  54. 8 8
      Assets/Script/Tool/Bundle.cs
  55. 9 9
      Assets/Script/Tool/DashGame/Language.cs
  56. 4 4
      Assets/Script/Tool/DashGame/Logo.cs
  57. 83 36
      Assets/Script/Tool/Data.cs
  58. 31 111
      Assets/Script/Tool/Extension.cs
  59. 2 2
      Assets/Script/Tool/SceneMask.cs
  60. 7 1
      Assets/Script/Tool/Shortcut.cs
  61. 0 0
      Assets/Script/Tool/Shortcut.cs.meta
  62. 2 2
      Assets/Script/Tool/UI/Bubble.cs
  63. 136 0
      Assets/Script/Tool/UI/HudTextPlus.cs
  64. 12 0
      Assets/Script/Tool/UI/HudTextPlus.cs.meta
  65. 11 5
      Assets/Script/Tool/UI/TextPlus.cs
  66. 1 0
      Assets/mcs.rsp
  67. 8 0
      Assets/mcs.rsp.meta
  68. 9 5
      MyLovelyGarden.csproj
  69. BIN
      ProjectSettings/ProjectSettings.asset
  70. 12 26
      ToList.txt

BIN
.vs/MyLovelyGarden/v14/.suo


BIN
Assets/Resource/Animations/Logo.anim


BIN
Assets/Resource/DebugMode.prefab


+ 8 - 0
Assets/Resource/DebugMode.prefab.meta

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

BIN
Assets/Resource/Logo.unity


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


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


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


+ 2 - 2
Assets/Resource/Sprite/Garden/技能树1.png.meta

@@ -37,8 +37,8 @@ TextureImporter:
   spriteMode: 1
   spriteExtrude: 1
   spriteMeshType: 1
-  alignment: 7
-  spritePivot: {x: 0.5, y: 0.5}
+  alignment: 9
+  spritePivot: {x: 0.5, y: -0.1}
   spriteBorder: {x: 0, y: 0, z: 0, w: 0}
   spritePixelsToUnits: 100
   alphaUsage: 1

+ 2 - 2
Assets/Resource/Sprite/Garden/技能添加彩虹.png.meta

@@ -37,8 +37,8 @@ TextureImporter:
   spriteMode: 1
   spriteExtrude: 1
   spriteMeshType: 1
-  alignment: 7
-  spritePivot: {x: 0.5, y: 0.5}
+  alignment: 9
+  spritePivot: {x: 0.5, y: -0.1}
   spriteBorder: {x: 0, y: 0, z: 0, w: 0}
   spritePixelsToUnits: 100
   alphaUsage: 1

+ 1 - 1
Assets/Resource/XML/Config/skill_config.xml

@@ -1,5 +1,5 @@
 <data>
-  <item id="1" name="人潮涌动" class="1" class_id="2" skill_index="1" reduce_cd="1" coin_person="" person="1" coin_once="" diamond_once="" skill_cd="" duration="300" cd="1800" unlock_lv="" unlock_ahead_cur="" unlock_ahead_amt="" unlock_cur="1" unlock_amnt="5" unlock_pos="" use__cur="" use_amnt="" upgrade_cur="2" upgrade_amnt="200" upgrade_fml="a" upgrade_plus="" upgrade_person="" upgrade_coin_once="" upgrade_duration="60" upgrade_cd="" desc="每分钟增加[&amp;person&amp;*60],持续[&amp;duration&amp;/60][lv]分钟" icon="4大技能1" anim="" label="" />
+  <item id="1" name="人潮涌动" class="1" class_id="2" skill_index="1" reduce_cd="1" coin_person="" person="1" coin_once="" diamond_once="" skill_cd="" duration="10" cd="1800" unlock_lv="" unlock_ahead_cur="" unlock_ahead_amt="" unlock_cur="1" unlock_amnt="5" unlock_pos="" use__cur="" use_amnt="" upgrade_cur="2" upgrade_amnt="200" upgrade_fml="a" upgrade_plus="" upgrade_person="" upgrade_coin_once="" upgrade_duration="60" upgrade_cd="" desc="每分钟增加[&amp;person&amp;*60],持续[&amp;duration&amp;/60][lv]分钟" icon="4大技能1" anim="" label="" />
   <item id="2" name="大亨光临" class="1" class_id="3" skill_index="2" reduce_cd="1" coin_person="" person="" coin_once="50000%" diamond_once="" skill_cd="" duration="" cd="3600" unlock_lv="100" unlock_ahead_cur="2" unlock_ahead_amt="200" unlock_cur="1" unlock_amnt="100" unlock_pos="" use__cur="" use_amnt="" upgrade_cur="2" upgrade_amnt="300" upgrade_fml="a" upgrade_plus="" upgrade_person="" upgrade_coin_once="5000%" upgrade_duration="" upgrade_cd="" desc="立即获得每人次收入的[&amp;coin_once&amp;][lv]倍" icon="4大技能2" anim="" label="" />
   <item id="3" name="花之祝福" class="1" class_id="4" skill_index="3" reduce_cd="1" coin_person="500%" person="" coin_once="" diamond_once="" skill_cd="" duration="300" cd="3600" unlock_lv="300" unlock_ahead_cur="2" unlock_ahead_amt="300" unlock_cur="" unlock_amnt="" unlock_pos="" use__cur="" use_amnt="" upgrade_cur="2" upgrade_amnt="300" upgrade_fml="a" upgrade_plus="" upgrade_person="" upgrade_coin_once="" upgrade_duration="60" upgrade_cd="" desc="所有收入提升[&amp;coin_person&amp;],持续[&amp;duration&amp;/60][lv]" icon="4大技能3" anim="" label="" />
   <item id="4" name="繁花似锦" class="4" class_id="1" skill_index="" reduce_cd="" coin_person="200%" person="" coin_once="" diamond_once="" skill_cd="" duration="900" cd="900" unlock_lv="100" unlock_ahead_cur="2" unlock_ahead_amt="100" unlock_cur="" unlock_amnt="" unlock_pos="" use__cur="2" use_amnt="150" upgrade_cur="" upgrade_amnt="" upgrade_fml="" upgrade_plus="" upgrade_person="" upgrade_coin_once="" upgrade_duration="" upgrade_cd="" desc="所有金币产出提升[&amp;coin_person&amp;],持续[&amp;duration&amp;]分钟" icon="绿-繁花似锦" anim="" label="" />

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

@@ -1,9 +1,9 @@
 <PlayerConfig>
-  <Version value="224" />
+  <Version value="284" />
 
   <ID value="Default" />
 ////  <TutorialA value="0" />
-  <TutorialB value="1" />
+  <TutorialB value="0" />
 ////  <TutorialC value="0" />
   <TutorialIndexA value="1" />
   <TutorialIndexB value="1" />

BIN
Assets/Resource/Xlsx/language_config.xlsx


+ 5 - 0
Assets/Script/Editor/EditorAuxiliary.cs

@@ -24,6 +24,11 @@ public class EditorAuxiliary : Editor
     {
         base.OnInspectorGUI();
 
+        if (GUILayout.Button("Temp"))
+        {
+            
+        }
+
         if (GUILayout.Button("PrintBounds"))
         {
             PrintBounds();

+ 54 - 13
Assets/Script/Editor/EditorBundle.cs

@@ -20,60 +20,101 @@ public class EditorBundle : Editor
         Bundle.Instance = Script;
     }
 
+    public override void OnInspectorGUI()
+    {
+        base.OnInspectorGUI();
+
+        if (GUILayout.Button("ClearTexture"))
+        {
+            for (int i = 0; i < Script.UiList.Count; i++)
+            {
+                Sprite sprite = Script.UiList[i] as  Sprite;
+
+                if (sprite == null)
+                {
+                    Texture2D texture = Script.UiList[i] as Texture2D;
+
+                    if (texture != null)
+                    {
+                        Script.UiList.RemoveAt(i--);
+                    }
+                }
+            }
+
+            for (int i = 0; i < Script.SceneList.Count; i++)
+            {
+                Sprite sprite = Script.SceneList[i] as Sprite;
+
+                if (sprite == null)
+                {
+                    Texture2D texture = Script.SceneList[i] as Texture2D;
+
+                    if (texture != null)
+                    {
+                        Script.SceneList.RemoveAt(i--);
+                    }
+                }
+            }
+        }
+    }
+
+
     public static void Tag()
     {
         string path;
-
+        Bundle bundle;
         AssetImporter assetImporter;
 
-        for (int i = 0; i < Script.UiList.Count; i++)
+        bundle = AssetDatabase.LoadAssetAtPath<Bundle>("Assets/Resource/DebugMode.prefab");
+
+        for (int i = 0; i < bundle.UiList.Count; i++)
         {
-            path = AssetDatabase.GetAssetPath(Script.UiList[i]);
+            path = AssetDatabase.GetAssetPath(bundle.UiList[i]);
 
             assetImporter = AssetImporter.GetAtPath(path);
 
             assetImporter.assetBundleName = "ui";
         }
 
-        for (int i = 0; i < Script.AtlasList.Count; i++)
+        for (int i = 0; i < bundle.AtlasList.Count; i++)
         {
-            path = AssetDatabase.GetAssetPath(Script.AtlasList[i]);
+            path = AssetDatabase.GetAssetPath(bundle.AtlasList[i]);
 
             assetImporter = AssetImporter.GetAtPath(path);
 
             assetImporter.assetBundleName = "atlas";
         }
 
-        for (int i = 0; i < Script.EffectList.Count; i++)
+        for (int i = 0; i < bundle.EffectList.Count; i++)
         {
-            path = AssetDatabase.GetAssetPath(Script.EffectList[i]);
+            path = AssetDatabase.GetAssetPath(bundle.EffectList[i]);
 
             assetImporter = AssetImporter.GetAtPath(path);
 
             assetImporter.assetBundleName = "effect";
         }
 
-        for (int i = 0; i < Script.AudioList.Count; i++)
+        for (int i = 0; i < bundle.AudioList.Count; i++)
         {
-            path = AssetDatabase.GetAssetPath(Script.AudioList[i]);
+            path = AssetDatabase.GetAssetPath(bundle.AudioList[i]);
 
             assetImporter = AssetImporter.GetAtPath(path);
 
             assetImporter.assetBundleName = "audio";
         }
 
-        for (int i = 0; i < Script.SceneList.Count; i++)
+        for (int i = 0; i < bundle.SceneList.Count; i++)
         {
-            path = AssetDatabase.GetAssetPath(Script.SceneList[i]);
+            path = AssetDatabase.GetAssetPath(bundle.SceneList[i]);
 
             assetImporter = AssetImporter.GetAtPath(path);
 
             assetImporter.assetBundleName = "scene";
         }
 
-        for (int i = 0; i < Script.ConfigList.Count; i++)
+        for (int i = 0; i < bundle.ConfigList.Count; i++)
         {
-            path = AssetDatabase.GetAssetPath(Script.ConfigList[i]);
+            path = AssetDatabase.GetAssetPath(bundle.ConfigList[i]);
 
             assetImporter = AssetImporter.GetAtPath(path);
 

+ 23 - 5
Assets/Script/Manage/Initializer.cs

@@ -12,13 +12,18 @@ public class Initializer : MonoBehaviour
 {
     #region 变量
 
-    public static bool LoadComplete;
+    public bool DebugMode;
+
+    public GameObject DebugModeGo;
+
+    public static bool Complete;
     public static Initializer Instance;
     public static Transform Transform;
     public static List<Regist> RegistList = new List<Regist>();
 
     #endregion
 
+
     private void Awake()
     {
         DontDestroyOnLoad(gameObject);
@@ -28,6 +33,15 @@ public class Initializer : MonoBehaviour
         Instance = this;
         Transform = transform;
 
+        if (DebugMode)
+        {
+            Instantiate(DebugModeGo, transform);
+        }
+        else
+        {
+            gameObject.AddComponent<Bundle>();
+        }
+
         gameObject.AddComponent<ManaIAP>();
 
         gameObject.AddScript<Auxiliary>();
@@ -90,7 +104,7 @@ public class Initializer : MonoBehaviour
             RegistList[i].enabled = true;
         }
 
-        LoadComplete = true;
+        Complete = true;
         
         ManaData.LoginCallbackInitial(new JsonData());
 
@@ -99,23 +113,27 @@ public class Initializer : MonoBehaviour
         ManaReso.SetActive("I_Lab", false);
 
         ManaIAP.Initialize();
+
         ManaVisit.Initialize();
     }
 
 
     public IEnumerator IInitialize()
     {
-        while (Bundle.LoadComplete == false)
+        while (!Logo.Complete)
         {
             yield return null;
         }
 
-        while (!Logo.LogoComplete)
+        while (!Bundle.Complete)
         {
             yield return null;
         }
 
-        //ManaUI.InitialInstantiate();
+        while (Data.DamageXml)
+        {
+            yield return null;
+        }
 
         Initialize();
     }

+ 210 - 186
Assets/Script/Manage/ManaAchieve.cs

@@ -58,21 +58,43 @@ public class Achieve
     {
         get { return ManaReso.Load<Sprite>(Icon_, Folder.UI); }
     }
+    public double CurrentValue
+    {
+        get { return CurrentValue_; }
+        set
+        {
+            CurrentValue_ = value;
+
+            Slider.value = (float)(CurrentValue_ / TargetValue);
+
+            if (CurrentValue_ >= TargetValue)
+            {
+                ToComplete();
+            }
+            else
+            {
+                ToProcess(CurrentValue_);
+            }
+        }
+    }
 
     public int ID_;
-    public bool Available = true;
     public string Icon_;
+    public double CurrentValue_;
 
     public int Index;
     public int Parent;
-    public bool Delete;
-    public bool Availible;
     public float Person;
     public float CoinPerson;
     public float DiamondOnce;
-    public double Value;
-    public AchieveType Type;
-    public List<Achieve> PostAchieveList = new List<Achieve>();
+
+    public bool Valid = true;
+    public bool Delete;
+    public bool Complete;
+    public double TargetValue;
+
+    public Achieve PostAchieve;
+    public AchieveType AchieveType;
 
     public Text Tit;
     public Text Lab;
@@ -87,23 +109,24 @@ public class Achieve
     public Achieve(XmlAttributeCollection attribute)
     {
         Icon_ = attribute[11].Value;
-        Type = TypeParse(attribute[4].Value);
         Delete = Auxiliary.BoolParse(attribute[7].Value, false);
         Parent = Auxiliary.IntParse(attribute[6].Value, -1);
+        AchieveType = TypeParse(attribute[4].Value);
 
         ID_ = int.Parse(attribute[0].Value);
         Index = int.Parse(attribute[1].Value) - 1;
-        Value = double.Parse(attribute[5].Value);
+        TargetValue = double.Parse(attribute[5].Value);
 
         Person = Auxiliary.FloatParse(attribute[10].Value, 0);
         CoinPerson = Auxiliary.FloatParse(attribute[9].Value, 0);
         DiamondOnce = Auxiliary.FloatParse(attribute[8].Value, 0);
 
+
         ManaAchieve.AchieveDic.Add(ID_, this);
         
         if (Parent != -1)
         {
-            ManaAchieve.AchieveDic[Parent].PostAchieveList.Add(this);
+            ManaAchieve.AchieveDic[Parent].PostAchieve = this;
         }
     }
 
@@ -123,43 +146,44 @@ public class Achieve
         Button = dic["Btn"].GetComponent<Button>();
         BtnLab = dic["BtnLab"].GetComponent<Text>();
 
-        ManaLan.Add(Tit, new LanStr("AchieveName", ID));
 
-        Lab.text = GetDescription(Desc, Value);
+        Lab.text = GetDescription(Desc, TargetValue);
 
         Image.sprite = Icon;
+
         AchieveItem.SetSiblingIndex(Index);
 
         Button.onClick.RemoveAllListeners();
         Button.onClick.AddListener(GetAward);
 
-        if (Available)
+        ManaLan.Add(Tit, new LanStr("AchieveName", ID));
+
+
+        if (Valid)
         {
-            UpdateValue();
+            UpdateStatus();
             
-            ManaAchieve.DeleDic[Type] += UpdateValue;
+            ManaAchieve.DeleDic.Add(AchieveType, UpdateStatus);
         }
         else
         {
-            ToComplete();       
+            ToFinish();
         }
     }
 
     public void GetAward()
     {
-        ManaAchieve.AchieveDepth--;
-
-        ManaDebug.Log(string.Format("获得钻石<color=red>{0}</color> 参观人次+<color=red>{1}</color> 每人次金币+<color=red>{2}</color>", DiamondOnce, Person, CoinPerson));
-
-        ManaAudio.PlayClip(Clip.CurrentClip);
+        Valid = false;
 
         ManaData.Diamond += DiamondOnce;
         ManaData.SkillPerson += Person;
         ManaData.SkillCoinPerson += CoinPerson;
 
-        Available = false;
+        ManaAudio.PlayClip(Clip.CurrentClip);
+
+        ManaAchieve.AchieveDepth--;
 
-        ManaAchieve.DeleDic[Type] -= UpdateValue;
+        ManaAchieve.DeleDic.Remove(AchieveType);
 
         if (Delete)
         {
@@ -167,68 +191,67 @@ public class Achieve
 
             AchieveItem = null;
 
-            if (PostAchieveList.Count > 0)
+            if (PostAchieve != null)
             {
-                PostAchieveList[0].Regist();
+                PostAchieve.Regist();
             }
         }
         else
         {
-            ToComplete();
+            ToFinish();
         }
     }
 
-    public AchieveType TypeParse(string str)
-    {
-        int integer = int.Parse(str);
 
-        if (integer == 1)
+    public void UpdateStatus()
+    {
+        if (AchieveType == AchieveType.TotalPerson)
         {
-            return AchieveType.GardenLevel;
+            UpdateStatus(ManaData.TotalPerson);
         }
-        else if (integer == 2)
+        else if (AchieveType == AchieveType.ElfLevel)
         {
-            return AchieveType.CurrentCoin;
+            UpdateStatus(ManaData.ElfLevel);
         }
-        else if (integer == 3)
+        else if (AchieveType == AchieveType.GardenLevel)
         {
-            return AchieveType.TotalCoin;
+            UpdateStatus(ManaData.Level);
         }
-        else if (integer == 4)
+        else if (AchieveType == AchieveType.AdAmt)
         {
-            return AchieveType.ElfLevel;
+            UpdateStatus(ManaData.AdAmt);
         }
-        else if (integer == 5)
+        else if (AchieveType == AchieveType.SkillAmt)
         {
-            return AchieveType.FlowerAmt;
+            UpdateStatus(ManaData.SkillAmt);
         }
-        else if (integer == 6)
+        else if (AchieveType == AchieveType.SignAmt)
         {
-            return AchieveType.TotalPerson;
+            UpdateStatus(ManaData.SignAmt);
         }
-        else if (integer == 7)
+        else if (AchieveType == AchieveType.ShareAmt)
         {
-            return AchieveType.SkillAmt;
+            UpdateStatus(ManaData.ShareAmt);
         }
-        else if (integer == 8)
+        else if (AchieveType == AchieveType.FlowerAmt)
         {
-            return AchieveType.AdAmt;
+            UpdateStatus(ManaGarden.MyFlower);
         }
-        else if (integer == 9)
+        else if (AchieveType == AchieveType.MiniGameAmt)
         {
-            return AchieveType.SignAmt;
+            UpdateStatus(ManaData.MiniGameAmt);
         }
-        else if (integer == 10)
+        else if (AchieveType == AchieveType.TotalCoin)
         {
-            return AchieveType.ShareAmt;
+            UpdateStatus(ManaData.TotalCoin);
         }
-        else if (integer == 11)
+        else if (AchieveType == AchieveType.FlowerCoin)
         {
-            return AchieveType.MiniGameAmt;
+            UpdateStatus(ManaData.FlowerCoin);
         }
-        else if (integer == 12)
+        else if (AchieveType == AchieveType.CurrentCoin)
         {
-            return AchieveType.FlowerCoin;
+            UpdateStatus(ManaData.Coin);
         }
         else
         {
@@ -236,167 +259,165 @@ public class Achieve
         }
     }
 
+    public void UpdateStatus(double value)
+    {
+        CurrentValue = value;
+    }
+
 
-    public void UpdateValue()
+    public void ToFinish()
     {
-        double value;
+        Slider.value = 1;
 
-        if (Type == AchieveType.AdAmt)
-        {
-            value = ManaData.AdAmt;
-        }
-        else if (Type == AchieveType.SkillAmt)
-        {
-            value = ManaData.SkillAmt;
-        }
-        else if (Type == AchieveType.SignAmt)
-        {
-            value = ManaData.SignAmt;
-        }
-        else if (Type == AchieveType.ShareAmt)
-        {
-            value = ManaData.ShareAmt;
-        }
-        else if (Type == AchieveType.FlowerAmt)
-        {
-            value = ManaGarden.MyFlower;
-        }
-        else if (Type == AchieveType.TotalPerson)
-        {
-            value = ManaData.TotalPerson;
-        }
-        else if (Type == AchieveType.ElfLevel)
-        {
-            value = ManaData.ElfLevel;
-        }
-        else if (Type == AchieveType.TotalCoin)
-        {
-            value = ManaData.TotalCoin;
-        }
-        else if (Type == AchieveType.MiniGameAmt)
-        {
-            value = ManaData.MiniGameAmt;
-        }
-        else if (Type == AchieveType.FlowerCoin)
-        {
-            value = ManaData.FlowerCoin;
-        }
-        else if (Type == AchieveType.CurrentCoin)
-        {
-            value = ManaData.Coin;
-        }
-        else if (Type == AchieveType.GardenLevel)
-        {
-            value = ManaData.Level;
-        }
-        else
-        {
-            throw new Exception();
-        }
+        Complete = false;
 
-        UpdateValue(value);
-    }
+        Button.interactable = false;
 
-    public void UpdateValue(double value)
-    {
-        Slider.value = (float)(value / Value);
+        Button.image.material = null;
 
-        if (value >= Value)
-        {
-            ToAvailible();
-        }
-        else
-        {
-            ToProcess(value);
-        }
+        ManaLan.Add(BtnLab, new LanStr("Object", "AchieveItem_BtnLab2"));
     }
 
-
     public void ToProcess(double value)
     {
-        Availible = false;
+        Complete = false;
+
+        Button.interactable = false;
+
+        Button.image.material = Shortcut.GrayMat;
+
 
         List<object> objList = new List<object>();
         
         objList.Add(new LanStr("Object", "AchieveItem_BtnLab0"));
         objList.Add("\n");
 
-        if (Math.Abs(DiamondOnce) > 0.0005f)
+        if (!DiamondOnce.Equal(0))
         {
-            objList.Add("<(钻石)>" + DiamondOnce.ToString("0"));
+            objList.Add("<(钻石)>" + DiamondOnce.ToString("0") + " ");
         }
 
-        if (Math.Abs(CoinPerson) > 0.0005f)
+        if (!CoinPerson.Equal(0))
         {
             objList.Add(new LanStr("Common", "CoinPerson"));
             objList.Add("+");
             objList.Add(CoinPerson.ToString("0") + " ");
         }
 
-        if (Math.Abs(Person) > 0.0005f)
+        if (!Person.Equal(0))
         {
             objList.Add(new LanStr("Common", "Person"));
             objList.Add("+");
             objList.Add(Person.ToString("0") + " ");
         }
 
-        Button.image.material = ManaReso.Load<Material>("GrayMat", Folder.Effect);
-        Button.interactable = false;
-
         ManaLan.Add(BtnLab, objList.ToArray());
     }
 
-    public void ToAvailible()
+    public void ToComplete()
     {
-        if (!Availible)
+        if (Complete)
         {
-            ManaAchieve.AchieveDepth++;
+            return;
         }
 
-        Availible = true;
+
+        ManaAchieve.AchieveDepth++;
+
+
+        Complete = true;
+
+        Button.interactable = true;
+
+        Button.image.material = null;
+
 
         List<object> objList = new List<object>();
 
         objList.Add(new LanStr("Object", "AchieveItem_BtnLab1"));
         objList.Add("\n");
 
-        if (Math.Abs(DiamondOnce) > 0.0005f)
+        if (!DiamondOnce.Equal(0))
         {
-            objList.Add("<(钻石)>" + DiamondOnce.ToString("0"));
+            objList.Add("<(钻石)>" + DiamondOnce.ToString("0") + " ");
         }
 
-        if (Math.Abs(CoinPerson) > 0.0005f)
+        if (!CoinPerson.Equal(0))
         {
             objList.Add(new LanStr("Common", "CoinPerson"));
             objList.Add("+");
             objList.Add(CoinPerson.ToString("0") + " ");
         }
 
-        if (Math.Abs(Person) > 0.0005f)
+        if (!Person.Equal(0))
         {
             objList.Add(new LanStr("Common", "Person"));
             objList.Add("+");
             objList.Add(Person.ToString("0") + " ");
         }
 
-        Button.image.material = null;
-        Button.interactable = true;
-
         ManaLan.Add(BtnLab, objList.ToArray());
     }
 
-    public void ToComplete()
-    {
-        Slider.value = 1;
-        Availible = false;
 
-        Button.image.material = null;
-        Button.interactable = false;
+    public AchieveType TypeParse(string str)
+    {
+        int integer = int.Parse(str);
 
-        ManaLan.Add(BtnLab, new LanStr("Object", "AchieveItem_BtnLab2"));
+        if (integer == 1)
+        {
+            return AchieveType.GardenLevel;
+        }
+        else if (integer == 2)
+        {
+            return AchieveType.CurrentCoin;
+        }
+        else if (integer == 3)
+        {
+            return AchieveType.TotalCoin;
+        }
+        else if (integer == 4)
+        {
+            return AchieveType.ElfLevel;
+        }
+        else if (integer == 5)
+        {
+            return AchieveType.FlowerAmt;
+        }
+        else if (integer == 6)
+        {
+            return AchieveType.TotalPerson;
+        }
+        else if (integer == 7)
+        {
+            return AchieveType.SkillAmt;
+        }
+        else if (integer == 8)
+        {
+            return AchieveType.AdAmt;
+        }
+        else if (integer == 9)
+        {
+            return AchieveType.SignAmt;
+        }
+        else if (integer == 10)
+        {
+            return AchieveType.ShareAmt;
+        }
+        else if (integer == 11)
+        {
+            return AchieveType.MiniGameAmt;
+        }
+        else if (integer == 12)
+        {
+            return AchieveType.FlowerCoin;
+        }
+        else
+        {
+            throw new Exception();
+        }
     }
 
-
     public static string GetDescription(string desc, double value)
     {
         return desc.Replace("[&value&]", value.ToString("0"));
@@ -419,43 +440,45 @@ public class ManaAchieve : Regist
                 return;
             }
 
+
             Outline outline = ManaReso.Get<Outline>("C_Achieve");
+            Tween tween = outline.GetTweenOutline();
 
-            if (outline != null)
+            if (tween == null)
+            {
+                return;
+            }
+
+            if (AchieveDepth_ == 0)
+            {
+                outline.enabled = false;
+
+                tween.Pause();
+            }
+            else if (AchieveDepth_ > 0)
             {
-                if (AchieveDepth_ == 0)
+                if (tween.InForward)
                 {
-                    outline.enabled = false;
+                    tween.StartForward();
                 }
-                else if (AchieveDepth_ > 0)
+                else if (tween.InBackward)
                 {
-                    outline.enabled = true;
-
-                    ManaReso.Get("C_Achieve").TweenForOutline();
+                    tween.StartBackward();
                 }
                 else
                 {
-                    throw new Exception();
+                    tween.StartForward();
                 }
             }
+            else
+            {
+                throw new Exception();
+            }
         }
     }
 
     public static int AchieveDepth_;
 
-    public static UnityAction<double> TotalPerson;
-    public static UnityAction<double> AdAmt;
-    public static UnityAction<double> SkillAmt;
-    public static UnityAction<double> SignAmt;
-    public static UnityAction<double> ShareAmt;
-    public static UnityAction<double> FlowerAmt;
-    public static UnityAction<double> MiniGameAmt;
-    public static UnityAction<double> ElfLevel;
-    public static UnityAction<double> GardenLevel;
-    public static UnityAction<double> TotalCoin;
-    public static UnityAction<double> FlowerCoin;
-    public static UnityAction<double> CurrentCoin;
-
     public static Dictionary<int, Achieve> AchieveDic = new Dictionary<int, Achieve>();
     public static Dictionary<AchieveType, UnityAction<double>> DeleDic = new Dictionary<AchieveType, UnityAction<double>>();
 
@@ -467,18 +490,6 @@ public class ManaAchieve : Regist
     {
         Instance = this;
 
-        DeleDic.Add(AchieveType.TotalPerson, TotalPerson);
-        DeleDic.Add(AchieveType.ElfLevel, ElfLevel);
-        DeleDic.Add(AchieveType.GardenLevel, GardenLevel);
-        DeleDic.Add(AchieveType.TotalCoin, TotalCoin);
-        DeleDic.Add(AchieveType.FlowerCoin, FlowerCoin);
-        DeleDic.Add(AchieveType.CurrentCoin, CurrentCoin);
-        DeleDic.Add(AchieveType.AdAmt, AdAmt);
-        DeleDic.Add(AchieveType.SkillAmt, SkillAmt);
-        DeleDic.Add(AchieveType.SignAmt, SignAmt);
-        DeleDic.Add(AchieveType.ShareAmt, ShareAmt);
-        DeleDic.Add(AchieveType.FlowerAmt, FlowerAmt);
-        DeleDic.Add(AchieveType.MiniGameAmt, MiniGameAmt);
 
         List<XmlAttributeCollection> attributeList = Data.GetAchieveConfig();
 
@@ -492,22 +503,22 @@ public class ManaAchieve : Regist
 
         for (int i = 0; i < achieveList.Count; i++)
         {
-            AchieveDic[achieveList[i]].Available = false;
+            AchieveDic[achieveList[i]].Valid = false;
         }
 
 
         foreach (var kv in AchieveDic)
         {
-            if (kv.Value.Available)
+            if (kv.Value.Valid)
             {
-                if (kv.Value.Parent == -1 || !AchieveDic[kv.Value.Parent].Available)
+                if (kv.Value.Parent == -1 || !AchieveDic[kv.Value.Parent].Valid)
                 {
                     kv.Value.Regist();
                 }
             }
             else
             {
-                if (kv.Value.Delete == false)
+                if (!kv.Value.Delete)
                 {
                     kv.Value.Regist();
                 }
@@ -523,7 +534,12 @@ public class ManaAchieve : Regist
 
     public static void UpdateStatus(AchieveType type, double value)
     {
-        DeleDic[type].SafeInvoke(value);
+        UnityAction<double> action;
+
+        if (DeleDic.TryGetValue(type, out action))
+        {
+            DeleDic[type].SafeInvoke(value);
+        }
     }
 
 
@@ -542,4 +558,12 @@ public class ManaAchieve : Regist
 
         Instance.RegistValueA();
     }
-}
+}
+
+#region DebugList
+
+//状态的转换(进行中->待领取->已完成)
+//成就的存档(进行中 已完成)
+//Reload后的成就
+
+#endregion

+ 76 - 349
Assets/Script/Manage/ManaAnim.cs

@@ -369,7 +369,7 @@ public class ManaAnim : Regist
             return start + delta;
         }
 
-        if (Math.Abs(duration) < 0.0005f)
+        if (duration.Equal(0))
         {
             return delta + start;
         }
@@ -397,7 +397,7 @@ public class ManaAnim : Regist
             return start + delta;
         }
 
-        if (Math.Abs(duration) < 0.0005f)
+        if (duration.Equal(0))
         {
             return delta + start;
         }
@@ -558,25 +558,25 @@ public class ManaAnim : Regist
     }
 
 
-    public static Zoom2D Zoom2D(Transform target, float origin, float destination, float duration, float stay, Transform targetZoom, Curve curve)
+    public static Zoom2D Zoom2D(Transform target, float origin, float destination, float duration, float stay, Transform zoom, Curve curve)
     {
         Zoom2D move;
 
         if (ZoomDic2D.TryGetValue(target, out move))
         {
-            move.StartZoom(origin, destination, duration, stay, targetZoom, curve);
+            move.StartZoom(origin, destination, duration, stay, zoom, curve);
         }
         else
         {
             move = CreateZoom2D(target);
 
-            move.StartZoom(origin, destination, duration, stay, targetZoom, curve);
+            move.StartZoom(origin, destination, duration, stay, zoom, curve);
         }
 
         return move;
     }
 
-    public static Zoom2D Zoom2D(Transform target, float destination, float duration, float stay, Transform targetZoom, Curve curve)
+    public static Zoom2D Zoom2D(Transform target, float destination, float duration, float stay, Transform zoom, Curve curve)
     {
         Zoom2D move;
 
@@ -584,13 +584,13 @@ public class ManaAnim : Regist
 
         if (ZoomDic2D.TryGetValue(target, out move))
         {
-            move.StartZoom(camera.orthographicSize, destination, duration, stay, targetZoom, curve);
+            move.StartZoom(camera.orthographicSize, destination, duration, stay, zoom, curve);
         }
         else
         {
             move = CreateZoom2D(target);
 
-            move.StartZoom(camera.orthographicSize, destination, duration, stay, targetZoom, curve);
+            move.StartZoom(camera.orthographicSize, destination, duration, stay, zoom, curve);
         }
 
         return move;
@@ -970,330 +970,6 @@ public class ManaAnim : Regist
     }
 
 
-    public static TweenSr TweenConForSr(Transform target)
-    {
-        TweenSr tween;
-
-        if (TweenSrDic.TryGetValue(target, out tween))
-        {
-            tween.ConfineForward();
-        }
-        else
-        {
-            throw new Exception();
-        }
-
-        return tween;
-    }
-
-    public static TweenCG TweenConForCG(Transform target)
-    {
-        TweenCG tween;
-
-        if (TweenCgDic.TryGetValue(target, out tween))
-        {
-            tween.ConfineForward();
-        }
-        else
-        {
-            throw new Exception();
-        }
-
-        return tween;
-    }
-
-    public static TweenGra TweenConForGra(Transform target)
-    {
-        TweenGra tween;
-
-        if (TweenGraDic.TryGetValue(target, out tween))
-        {
-            tween.ConfineForward();
-        }
-        else
-        {
-            throw new Exception();
-        }
-
-        return tween;
-    }
-
-    public static TweenVec TweenConForVec(Transform target)
-    {
-        TweenVec tween;
-
-        if (TweenVecDic.TryGetValue(target, out tween))
-        {
-            tween.ConfineForward();
-        }
-        else
-        {
-            throw new Exception();
-        }
-
-        return tween;
-    }
-
-    public static TweenFont TweenConForFont(Transform target)
-    {
-        TweenFont tween;
-
-        if (TweenFontDic.TryGetValue(target, out tween))
-        {
-            tween.ConfineForward();
-        }
-        else
-        {
-            throw new Exception();
-        }
-
-        return tween;
-    }
-
-    public static TweenRect TweenConForRect(Transform target)
-    {
-        TweenRect tween;
-
-        if (TweenRectDic.TryGetValue(target, out tween))
-        {
-            tween.ConfineForward();
-        }
-        else
-        {
-            throw new Exception();
-        }
-
-        return tween;
-    }
-
-    public static TweenScale TweenConForScale(Transform target)
-    {
-        TweenScale tween;
-
-        if (TweenScaleDic.TryGetValue(target, out tween))
-        {
-            tween.ConfineForward();
-        }
-        else
-        {
-            throw new Exception();
-        }
-
-        return tween;
-    }
-
-    public static TweenAudio TweenConForAudio(Transform target)
-    {
-        TweenAudio tween;
-        AudioSource audioSource = target.GetComponent<AudioSource>();
-
-        if (TweenAudioDic.TryGetValue(audioSource, out tween))
-        {
-            tween.ConfineForward();
-        }
-        else
-        {
-            throw new Exception();
-        }
-
-        return tween;
-    }
-
-    public static TweenAudio TweenConForAudio(AudioSource audioSource)
-    {
-        TweenAudio tween;
-
-        if (TweenAudioDic.TryGetValue(audioSource, out tween))
-        {
-            tween.ConfineForward();
-        }
-        else
-        {
-            throw new Exception();
-        }
-
-        return tween;
-    }
-
-    public static TweenNumber TweenConForNumber(Transform target)
-    {
-        TweenNumber tween;
-
-        if (TweenNumberDic.TryGetValue(target, out tween))
-        {
-            tween.ConfineForward();
-        }
-        else
-        {
-            throw new Exception();
-        }
-
-        return tween;
-    }
-
-
-    public static TweenSr TweenConBacSr(Transform target)
-    {
-        TweenSr tween;
-
-        if (TweenSrDic.TryGetValue(target, out tween))
-        {
-            tween.ConfineBackward();
-        }
-        else
-        {
-            throw new Exception();
-        }
-
-        return tween;
-    }
-
-    public static TweenCG TweenConBacCG(Transform target)
-    {
-        TweenCG tween;
-
-        if (TweenCgDic.TryGetValue(target, out tween))
-        {
-            tween.ConfineBackward();
-        }
-        else
-        {
-            throw new Exception();
-        }
-
-        return tween;
-    }
-
-    public static TweenGra TweenConBacGra(Transform target)
-    {
-        TweenGra tween;
-
-        if (TweenGraDic.TryGetValue(target, out tween))
-        {
-            tween.ConfineBackward();
-        }
-        else
-        {
-            throw new Exception(target.name);
-        }
-
-        return tween;
-    }
-
-    public static TweenVec TweenConBacVec(Transform target)
-    {
-        TweenVec tween;
-
-        if (TweenVecDic.TryGetValue(target, out tween))
-        {
-            tween.ConfineBackward();
-        }
-        else
-        {
-            throw new Exception(target.name);
-        }
-
-        return tween;
-    }
-
-    public static TweenFont TweenConBacFont(Transform target)
-    {
-        TweenFont tween;
-
-        if (TweenFontDic.TryGetValue(target, out tween))
-        {
-            tween.ConfineBackward();
-        }
-        else
-        {
-            throw new Exception();
-        }
-
-        return tween;
-    }
-
-    public static TweenRect TweenConBacRect(Transform target)
-    {
-        TweenRect tween;
-
-        if (TweenRectDic.TryGetValue(target, out tween))
-        {
-            tween.ConfineBackward();
-        }
-        else
-        {
-            throw new Exception();
-        }
-
-        return tween;
-    }
-
-    public static TweenScale TweenConBacScale(Transform target)
-    {
-        TweenScale tween;
-
-        if (TweenScaleDic.TryGetValue(target, out tween))
-        {
-            tween.ConfineBackward();
-        }
-        else
-        {
-            throw new Exception();
-        }
-
-        return tween;
-    }
-
-    public static TweenAudio TweenConBacAudio(Transform target)
-    {
-        TweenAudio tween;
-        AudioSource audioSource = target.GetComponent<AudioSource>();
-
-        if (TweenAudioDic.TryGetValue(audioSource, out tween))
-        {
-            tween.ConfineBackward();
-        }
-        else
-        {
-            throw new Exception();
-        }
-
-        return tween;
-    }
-
-    public static TweenAudio TweenConBacAudio(AudioSource audioSource)
-    {
-        TweenAudio tween;
-
-        if (TweenAudioDic.TryGetValue(audioSource, out tween))
-        {
-            tween.ConfineBackward();
-        }
-        else
-        {
-            throw new Exception();
-        }
-
-        return tween;
-    }
-
-    public static TweenNumber TweenConBacNumber(Transform target)
-    {
-        TweenNumber tween;
-
-        if (TweenNumberDic.TryGetValue(target, out tween))
-        {
-            tween.ConfineBackward();
-        }
-        else
-        {
-            throw new Exception();
-        }
-
-        return tween;
-    }
-
-
     public static TweenSr TweenReForSr(Transform target)
     {
         TweenSr tween;
@@ -1653,7 +1329,7 @@ public class ManaAnim : Regist
 
     #region 获取动画
 
-    public static float GetTimerVec3(Vector3 value, float duration, Vector3 start, Vector3 delta, Curve curve)
+    public static float GetTimerVec(Vector3 value, float duration, Vector3 start, Vector3 delta, Curve curve)
     {
         if (!delta.x.Equal(0))
         {
@@ -1680,19 +1356,19 @@ public class ManaAnim : Regist
 
     public static float GetTimerColor(Color value, float duration, Color start, Color delta, Curve curve)
     {
-        if (Math.Abs(delta.r) > 0.0005f)
+        if (!delta.r.Equal(0))
         {
             return TimerFunctionDic[curve](value.r, duration, start.r, delta.r);
         }
-        else if (Math.Abs(delta.g) > 0.0005f)
+        else if (!delta.g.Equal(0))
         {
             return TimerFunctionDic[curve](value.g, duration, start.g, delta.g);
         }
-        else if (Math.Abs(delta.b) > 0.0005f)
+        else if (!delta.b.Equal(0))
         {
             return TimerFunctionDic[curve](value.b, duration, start.b, delta.b);
         }
-        else if (Math.Abs(delta.a) > 0.0005f)
+        else if (!delta.a.Equal(0))
         {
             return TimerFunctionDic[curve](value.a, duration, start.a, delta.a);
         }
@@ -2060,7 +1736,7 @@ public class ManaAnim : Regist
     }
 
 
-    public static TweenSr CreateTweenSr(Transform target, float originAlpha, float destinationAlpha, float duration, bool originActive, bool destActive, Curve curve, bool cg = false, bool group = false)
+    public static TweenSr CreateTweenSr(Transform target, float originAlpha, float destAlpha, float duration, bool originActive, bool destActive, Curve curve, bool cg = false, bool group = false)
     {
         TweenSr tweenSr;
         SpriteRenderer sr = target.GetComponent<SpriteRenderer>();
@@ -2069,7 +1745,7 @@ public class ManaAnim : Regist
         Color destination = sr.color;
 
         origin.a = originAlpha;
-        destination.a = destinationAlpha;
+        destination.a = destAlpha;
 
         if (TweenSrDic.ContainsKey(target))
         {
@@ -2089,14 +1765,14 @@ public class ManaAnim : Regist
         }
     }
 
-    public static TweenSr CreateTweenSr(Transform target, float destinationAlpha, float duration, bool originActive, bool destActive, Curve curve, bool cg = false, bool group = false)
+    public static TweenSr CreateTweenSr(Transform target, float destAlpha, float duration, bool originActive, bool destActive, Curve curve, bool cg = false, bool group = false)
     {
         TweenSr tweenSr;
         SpriteRenderer sr = target.GetComponent<SpriteRenderer>();
 
         Color destination = sr.color;
 
-        destination.a = destinationAlpha;
+        destination.a = destAlpha;
 
         if (TweenSrDic.ContainsKey(target))
         {
@@ -2210,7 +1886,7 @@ public class ManaAnim : Regist
     }
 
 
-    public static TweenGra CreateTweenGra(Transform target, float originAlpha, float destinationAlpha, float duration, bool originActive, bool destActive, Curve curve, bool cg = false)
+    public static TweenGra CreateTweenGra(Transform target, float originAlpha, float destAlpha, float duration, bool originActive, bool destActive, Curve curve, bool cg = false)
     {
         Graphic graphic = target.GetComponent<Graphic>();
         TweenGra tweenGra;
@@ -2219,7 +1895,7 @@ public class ManaAnim : Regist
         Color destination = graphic.color;
 
         origin.a = originAlpha;
-        destination.a = destinationAlpha;
+        destination.a = destAlpha;
 
         if (TweenGraDic.ContainsKey(target))
         {
@@ -2239,14 +1915,14 @@ public class ManaAnim : Regist
         }
     }
 
-    public static TweenGra CreateTweenGra(Transform target, float destinationAlpha, float duration, bool originActive, bool destActive, Curve curve, bool cg = false)
+    public static TweenGra CreateTweenGra(Transform target, float destAlpha, float duration, bool originActive, bool destActive, Curve curve, bool cg = false)
     {
         Graphic graphic = target.GetComponent<Graphic>();
         TweenGra tweenGra;
 
         Color destination = graphic.color;
 
-        destination.a = destinationAlpha;
+        destination.a = destAlpha;
 
         if (TweenGraDic.ContainsKey(target))
         {
@@ -2611,6 +2287,57 @@ public class ManaAnim : Regist
     }
 
 
+    public static TweenScale CreateTweenScale(Transform target, float origin, float destination, float duration, bool originActive, bool destActive, Curve curve, bool cg = false)
+    {
+        Vector3 destScale = new Vector3(destination, destination, destination);
+        Vector3 originScale = new Vector3(origin, origin, origin);
+
+
+        TweenScale tweenScale;
+
+        if (TweenScaleDic.ContainsKey(target))
+        {
+            tweenScale = TweenScaleDic[target];
+
+            TweenScaleDic[target] = new TweenScale(target, originScale, destScale, duration, originActive, destActive, curve, cg);
+
+            return tweenScale;
+        }
+        else
+        {
+            tweenScale = new TweenScale(target, originScale, destScale, duration, originActive, destActive, curve, cg);
+
+            TweenScaleDic.Add(target, tweenScale);
+
+            return tweenScale;
+        }
+    }
+
+    public static TweenScale CreateTweenScale(Transform target, float destination, float duration, bool originActive, bool destActive, Curve curve, bool cg = false)
+    {
+        Vector3 destScale = new Vector3(destination, destination, destination);
+
+
+        TweenScale tweenScale;
+
+        if (TweenScaleDic.ContainsKey(target))
+        {
+            tweenScale = TweenScaleDic[target];
+
+            TweenScaleDic[target] = new TweenScale(target, target.localScale, destScale, duration, originActive, destActive, curve, cg);
+
+            return tweenScale;
+        }
+        else
+        {
+            tweenScale = new TweenScale(target, target.localScale, destScale, duration, originActive, destActive, curve, cg);
+
+            TweenScaleDic.Add(target, tweenScale);
+
+            return tweenScale;
+        }
+    }
+
     public static TweenScale CreateTweenScale(Transform target, Vector3 origin, Vector3 destination, float duration, bool originActive, bool destActive, Curve curve, bool cg = false)
     {
         TweenScale tweenScale;
@@ -2747,7 +2474,7 @@ public class ManaAnim : Regist
     }
 
 
-    public static TweenOutline CreateTweenOutline(Transform target, float originAlpha, float destinationAlpha, float duration, bool originActive, bool destActive, Curve curve, bool cg = false)
+    public static TweenOutline CreateTweenOutline(Transform target, float originAlpha, float destAlpha, float duration, bool originActive, bool destActive, Curve curve, bool cg = false)
     {
         Outline outline = target.GetComponent<Outline>();
         TweenOutline tweenOutline;
@@ -2756,7 +2483,7 @@ public class ManaAnim : Regist
         Color destination = outline.effectColor;
 
         origin.a = originAlpha;
-        destination.a = destinationAlpha;
+        destination.a = destAlpha;
 
         if (TweenOutlineDic.ContainsKey(target))
         {
@@ -2776,14 +2503,14 @@ public class ManaAnim : Regist
         }
     }
 
-    public static TweenOutline CreateTweenOutline(Transform target, float destinationAlpha, float duration, bool originActive, bool destActive, Curve curve, bool cg = false)
+    public static TweenOutline CreateTweenOutline(Transform target, float destAlpha, float duration, bool originActive, bool destActive, Curve curve, bool cg = false)
     {
         Outline graphic = target.GetComponent<Outline>();
         TweenOutline tweenOutline;
 
         Color destination = graphic.effectColor;
 
-        destination.a = destinationAlpha;
+        destination.a = destAlpha;
 
         if (TweenOutlineDic.ContainsKey(target))
         {

+ 65 - 23
Assets/Script/Manage/ManaData.cs

@@ -125,7 +125,7 @@ public class ManaData : Regist
         set
         {
             Level_ = value;
-
+            
             ManaDebug.Log(string.Format("已升级 花园等级 : <color=red>{0}</color>", Level_));
 
             ManaAchieve.UpdateStatus(AchieveType.GardenLevel, Level_);
@@ -206,7 +206,7 @@ public class ManaData : Regist
         {
             Person_ = value;
 
-            ManaReso.SetText("F_PersonLab", Mathf.FloorToInt(60*(Person_ + SkillPerson_)).ToString());
+            ManaReso.SetText("F_PersonLab", Mathf.FloorToInt(60*(Person_ * (1 + SkillPersonBuff_) + SkillPerson_)).ToString());
         }
     }
     public static float SkillPerson
@@ -215,17 +215,32 @@ public class ManaData : Regist
         set
         {
             SkillPerson_ = value;
-
+           
             if (SkillPerson_.Equal(0))
             {
+                ManaReso.Get("F_PersonLab").GetTweenOutline().Pause();
+
                 ManaReso.Get<Outline>("F_PersonLab").enabled = false;
             }
             else
             {
-                ManaReso.Get("F_PersonLab").TweenReForOutline();
+                Tween tween = ManaReso.Get("F_PersonLab").GetTweenOutline();
+
+                if (tween.InForward)
+                {
+                    tween.StartForward();
+                }
+                else if (tween.InBackward)
+                {
+                    tween.StartBackward();
+                }
+                else
+                {
+                    tween.StartForward();
+                }
             }
 
-            ManaReso.SetText("F_PersonLab", Mathf.FloorToInt(60*(Person_ + SkillPerson_)).ToString());
+            ManaReso.SetText("F_PersonLab", Mathf.FloorToInt(60*(Person_ * (1 + SkillPersonBuff_) + SkillPerson_)).ToString());
         }
     }
     public static float CoinPerson
@@ -238,6 +253,16 @@ public class ManaData : Regist
             ManaReso.SetText("F_CoinPersonLab", Mathf.FloorToInt(CoinPerson_ + SkillCoinPerson_).ToString());
         }
     }
+    public static float SkillPersonBuff
+    {
+        get { return SkillPersonBuff_; }
+        set
+        {
+            SkillPersonBuff_ = value;
+
+            ManaReso.SetText("F_PersonLab", Mathf.FloorToInt(60 * (Person_ * (1 + SkillPersonBuff_) + SkillPerson_)).ToString());
+        }
+    }
     public static float SkillCoinPerson
     {
         get { return SkillCoinPerson_; }
@@ -247,11 +272,26 @@ public class ManaData : Regist
 
             if (SkillCoinPerson_.Equal(0))
             {
+                ManaReso.Get("F_CoinPersonLab").GetTweenOutline().Pause();
+
                 ManaReso.Get<Outline>("F_CoinPersonLab").enabled = false;
             }
             else
             {
-                ManaReso.Get("F_CoinPersonLab").TweenReForOutline();
+                Tween tween = ManaReso.Get("F_CoinPersonLab").GetTweenOutline();
+
+                if (tween.InForward)
+                {
+                    tween.StartForward();
+                }
+                else if (tween.InBackward)
+                {
+                    tween.StartBackward();
+                }
+                else
+                {
+                    tween.StartForward();
+                }
             }
 
             ManaReso.SetText("F_CoinPersonLab", Mathf.FloorToInt(CoinPerson_ + SkillCoinPerson_).ToString());
@@ -315,7 +355,7 @@ public class ManaData : Regist
 
     public static float SkillPlus;
     public static float SkillPerson_;
-    public static float SkillPersonBuff;
+    public static float SkillPersonBuff_;
     public static float SkillCoinPerson_;
 
     public static DateTime QuitTime;
@@ -444,7 +484,7 @@ public class ManaData : Regist
 
             ManaReso.Get("C_IncomeLab").TweenForGra();
             ManaReso.Get("C_IncomeLab").TweenForVec();
-            ManaReso.SetText("C_IncomeLab", "+" + temp.ToString("0"));
+            ManaReso.SetText("C_IncomeLab", "+" + temp.ToString("0.0"));
 
             ManaDebug.Log(string.Format("参观收益<color=red>{0:0.0}</color> = <color=red>{1}</color> * <color=red>{2}</color> * <color=red>{3}</color> * <color=red>{4}</color> (人次*金币*时间*加成)", temp, NewPerson, NewCoinPerson, CircleTime, 1 + SkillPlus));
         }
@@ -461,7 +501,7 @@ public class ManaData : Regist
         {
             OpTimer = 0;
 
-            ManaReso.Get("C_Group").TweenConForCG();
+            ManaReso.Get("C_Group").TweenForCG();
         }
         else
         {
@@ -471,7 +511,7 @@ public class ManaData : Regist
             {
                 OpTimer = 0;
 
-                ManaReso.Get("C_Group").TweenConBacCG();
+                ManaReso.Get("C_Group").TweenBacCG();
             }
         }
     }
@@ -487,7 +527,7 @@ public class ManaData : Regist
 
         SkillPlus = 0;
         SkillPerson = 0;
-        SkillPersonBuff = 0;
+        SkillPersonBuff_ = 0;
         SkillCoinPerson = 0;
 
         SaveTimer = 0;
@@ -517,7 +557,7 @@ public class ManaData : Regist
         {
             if (!ManaTutorial.TutorialA && !ManaTutorial.TutorialB)
             {
-                ManaReso.Get("B_SignIn").TweenConForCG();
+                ManaReso.Get("B_SignIn").TweenForCG();
             }
         }
     }
@@ -536,10 +576,10 @@ public class ManaData : Regist
         {
             if (!ManaTutorial.TutorialA && !ManaTutorial.TutorialB)
             {
-                ManaReso.Get("C_Group").TweenConBacCG();
+                ManaReso.Get("C_Group").TweenBacCG();
 
-                ManaReso.Get("B_SignIn").TweenConForCG();
-                ManaReso.Get("Ba_Notice").TweenConForCG();
+                ManaReso.Get("B_SignIn").TweenForCG();
+                ManaReso.Get("Ba_Notice").TweenForCG();
             }
         }
     }
@@ -730,7 +770,7 @@ public class ManaData : Regist
                     FFCoolList.Add(FFUseList[i][j]);
                 }
 
-                NewPerson = Person * (1 + SkillPersonBuff) + SkillPerson;
+                NewPerson = Person * (1 + SkillPersonBuff_) + SkillPerson;
                 NewCoinPerson = CoinPerson + SkillCoinPerson;
 
                 TotalPerson += NewPerson * CircleTime;
@@ -922,7 +962,7 @@ public class ManaData : Regist
 
     public static void LoginCallbackInitial(JsonData jsonData)
     {
-        if (!Initializer.LoadComplete || !ManaServer.LoginComplete)
+        if (!Initializer.Complete || !ManaServer.Complete)
         {
             return;
         }
@@ -944,8 +984,8 @@ public class ManaData : Regist
         {
             if (!ManaTutorial.TutorialA)
             {
-                ManaReso.Get("B_SignIn").TweenConForCG();
-                ManaReso.Get("Ba_Notice").TweenConForCG();
+                ManaReso.Get("B_SignIn").TweenForCG();
+                ManaReso.Get("Ba_Notice").TweenForCG();
             }
         }
         else
@@ -958,8 +998,8 @@ public class ManaData : Regist
 
                 if (daySpan >= 1 || yearSpan >= 1 || monthSpan >= 1)
                 {
-                    ManaReso.Get("B_SignIn").TweenConForCG();
-                    ManaReso.Get("Bb_SignIn").TweenConForCG();
+                    ManaReso.Get("B_SignIn").TweenForCG();
+                    ManaReso.Get("Bb_SignIn").TweenForCG();
                 }
             }
         }
@@ -1040,7 +1080,7 @@ public class ManaData : Regist
 
     public void OnApplicationQuit()
     {
-        if (Initializer.LoadComplete && !Reset)
+        if (Initializer.Complete && !Reset)
         {
             Data.SavePlayerConfig();
             Data.SaveXml();
@@ -1062,7 +1102,7 @@ public class ManaData : Regist
             }
             else
             {
-                if (!Initializer.LoadComplete)
+                if (!Initializer.Complete)
                 {
                     return;
                 }
@@ -1074,6 +1114,8 @@ public class ManaData : Regist
                     return;
                 }
 
+                Auxiliary.DecryptXml(Data.PlayerDoc);
+
                 ReactiveRequest = true;
 
                 ManaServer.Login(LoginCallbackReactive);

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

@@ -127,7 +127,7 @@ public class ManaGarden : Regist
 
         if (ElfTimer < 0)
         {
-            ElfTimer = Random.Range(0f, 30f);
+            ElfTimer = Random.Range(0f, 3f);
 
             if (ElfList.Count > 0 && PlantList.Count > 0)
             {
@@ -240,7 +240,7 @@ public class ManaGarden : Regist
     {
         Instance = this;
 
-        ElfTimer = Random.Range(0f, 30f);
+        ElfTimer = Random.Range(0f, 3f);
         AwardTimer = Random.Range(5, 15);
 
         #region 读花朵存档

+ 1 - 4
Assets/Script/Manage/ManaIAP.cs

@@ -31,11 +31,8 @@ public class ManaIAP : MonoBehaviour, IStoreListener
         {
             return Application.persistentDataPath + "/ICON2.png";
         }
-        set { ImageUrl_ = value; }
     }
 
-    public static string ImageUrl_;
-
     public static string ShareUrl = "http://www.dashgame.com";
 
     public static ShareSDK ShareSdk;
@@ -188,7 +185,7 @@ public class ManaIAP : MonoBehaviour, IStoreListener
         shareContent.SetUrl(ShareUrl);
         shareContent.SetImagePath(ImageUrl);
         shareContent.SetShareType(ContentType.App);
-
+        
         PlatformType[] platformTypes = new[]
         {
             PlatformType.QQ,

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

@@ -78,7 +78,7 @@ public class ManaInfo : Regist
             Text.text = str + "\n" + Text.text;
         }
 
-        Text.TweenConForCG();
+        Text.TweenForCG();
 
         Lock = true;
         Timer = time;

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

@@ -96,7 +96,7 @@ public class ManaLan : Regist
         {
             if (kv.Value.AchieveItem != null)
             {
-                kv.Value.Lab.text = Achieve.GetDescription(kv.Value.Desc, kv.Value.Value);
+                kv.Value.Lab.text = Achieve.GetDescription(kv.Value.Desc, kv.Value.TargetValue);
             }
         }
 

+ 5 - 5
Assets/Script/Manage/ManaServer.cs

@@ -58,7 +58,7 @@ public class ManaServer : Regist
     public static bool Connect_;
 
     public static float Timer;
-    public static bool LoginComplete;
+    public static bool Complete;
     public static string ReportStr;
     public static string ID = "Default";
     public static JsonData JsonData;
@@ -68,7 +68,7 @@ public class ManaServer : Regist
 
     private void Update()
     {
-        if (!ManaData.InitiateComplete && !LoginComplete)
+        if (!ManaData.InitiateComplete && !Complete)
         {
             Timer += UnityEngine.Time.fixedDeltaTime;
 
@@ -93,7 +93,7 @@ public class ManaServer : Regist
     {
         ManaDebug.Log(jsonData.ToJson());
 
-        LoginComplete = true;
+        Complete = true;
 
         if (jsonData.Inst_Object.ContainsKey("c"))
         {
@@ -103,13 +103,13 @@ public class ManaServer : Regist
 
             Time = DateUtil.GetTime(jsonData["time"].ToJson());
 
-            if (Data._PlayerDoc != null)
+            if (Data.PlayerDoc_ != null)
             {
                 if (Data.GetPlayerString("ID") == "Default")
                 {
                     ID = jsonData["o"].ToString();
 
-                    if (Initializer.LoadComplete)
+                    if (Initializer.Complete)
                     {
                         ManaReso.SetText("L_UserLab", ID);
                     }

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

@@ -295,7 +295,7 @@ public class ManaTutorial : Regist
 
         ManaReso.SetActive("N_Tutorial", true);
 
-        Tween tween = ManaReso.Get("N_Mask").TweenConForGra();
+        Tween tween = ManaReso.Get("N_Mask").TweenForGra();
 
         tween.AddEventOnetime
         (

+ 28 - 26
Assets/Script/Manage/ManaUI.cs

@@ -84,12 +84,12 @@ public class ManaUI : Regist
 
         tween.OnForwardStart += () =>
         {
-            ManaReso.Get("C_Main").TweenBacCG();
+            ManaReso.Get("C_Group0").TweenBacCG();
         };
 
          tween.OnBackwardFinish += () =>
         {
-            ManaReso.Get("C_Main").TweenForCG();
+            ManaReso.Get("C_Group0").TweenForCG();
             ManaReso.Get("C_Group").GetTweenCG().InOrigin = true;
 
             ManaReso.Get("Bb_SignIn").TweenBacCG();
@@ -121,7 +121,7 @@ public class ManaUI : Regist
                 if (daySpan >= 1 || yearSpan >= 1 || monthSpan >= 1)
                 {
                     ManaReso.Get("Ba_Notice").TweenBacCG();
-                    ManaReso.Get("Bb_SignIn").TweenConForCG();
+                    ManaReso.Get("Bb_SignIn").TweenForCG();
 
                     ManaReso.SetActive("Ba_Notice", false);
                 }
@@ -200,6 +200,8 @@ public class ManaUI : Regist
 
         ManaReso.Get("C_Group").CreateTweenCG(0, 1, 0.25f, false, true, Curve.EaseOutQuad);
 
+        ManaReso.Get("C_Group0").CreateTweenCG(0, 1, 0.25f, false, true, Curve.EaseOutQuad);
+
         #endregion
 
         #region C_Setting
@@ -426,7 +428,7 @@ public class ManaUI : Regist
 
                 ManaMiniGame.Pause = true;
 
-                ManaReso.Get("Da_Info").TweenConForCG();
+                ManaReso.Get("Da_Info").TweenForCG();
 
                 ManaReso.Get("Da_CoinGroup").GetTweenScale().InDestination = true;
                 ManaReso.Get("Da_FlowerGroup").GetTweenScale().InDestination = true;
@@ -687,7 +689,7 @@ public class ManaUI : Regist
                 ManaReso.Get("GardenMini").TweenBacVec();
                 ManaReso.Get("D_MiniGame").TweenBacCG();
 
-                ManaInfo.Show(Award.Info, 4f);
+                ManaInfo.Show(Award.Info, 10f);
             }
         );
 
@@ -887,9 +889,9 @@ public class ManaUI : Regist
                 ManaAudio.PlayClip(Clip.BtnClip);
 
                 ManaReso.Get("F_Elf").TweenForScale();
-                ManaReso.Get("F_Store").TweenConBacScale();
-                ManaReso.Get("F_Magic").TweenConBacScale();
-                ManaReso.Get("F_Garden").TweenConBacScale();
+                ManaReso.Get("F_Store").TweenBacScale();
+                ManaReso.Get("F_Magic").TweenBacScale();
+                ManaReso.Get("F_Garden").TweenBacScale();
 
                 ManaReso.Get("F_Elf").SetAsLastSibling();
                 ManaReso.Get("F_Store").SetSiblingIndex(0);
@@ -922,10 +924,10 @@ public class ManaUI : Regist
             {
                 ManaAudio.PlayClip(Clip.BtnClip);
 
-                ManaReso.Get("F_Elf").TweenConBacScale();
+                ManaReso.Get("F_Elf").TweenBacScale();
                 ManaReso.Get("F_Store").TweenForScale();
-                ManaReso.Get("F_Magic").TweenConBacScale();
-                ManaReso.Get("F_Garden").TweenConBacScale();
+                ManaReso.Get("F_Magic").TweenBacScale();
+                ManaReso.Get("F_Garden").TweenBacScale();
 
                 ManaReso.Get("F_Elf").SetSiblingIndex(1);
                 ManaReso.Get("F_Store").SetAsLastSibling();
@@ -958,10 +960,10 @@ public class ManaUI : Regist
             {
                 ManaAudio.PlayClip(Clip.BtnClip);
 
-                ManaReso.Get("F_Elf").TweenConBacScale();
-                ManaReso.Get("F_Store").TweenConBacScale();
+                ManaReso.Get("F_Elf").TweenBacScale();
+                ManaReso.Get("F_Store").TweenBacScale();
                 ManaReso.Get("F_Magic").TweenForScale();
-                ManaReso.Get("F_Garden").TweenConBacScale();
+                ManaReso.Get("F_Garden").TweenBacScale();
 
                 ManaReso.Get("F_Elf").SetSiblingIndex(1);
                 ManaReso.Get("F_Store").SetSiblingIndex(0);
@@ -994,9 +996,9 @@ public class ManaUI : Regist
             {
                 ManaAudio.PlayClip(Clip.BtnClip);
 
-                ManaReso.Get("F_Elf").TweenConBacScale();
-                ManaReso.Get("F_Store").TweenConBacScale();
-                ManaReso.Get("F_Magic").TweenConBacScale();
+                ManaReso.Get("F_Elf").TweenBacScale();
+                ManaReso.Get("F_Store").TweenBacScale();
+                ManaReso.Get("F_Magic").TweenBacScale();
                 ManaReso.Get("F_Garden").TweenForScale();
 
                 ManaReso.Get("F_Elf").SetSiblingIndex(2);
@@ -1528,9 +1530,9 @@ public class ManaUI : Regist
                 ManaReso.Get<Button>("L_SimChi").interactable = true;
                 ManaReso.Get<Button>("L_English").interactable = true;
 
-                ManaReso.Get<Button>("L_TraChi").image.color = ManaColor.Orange;
-                ManaReso.Get<Button>("L_SimChi").image.color = ManaColor.LightGray;
-                ManaReso.Get<Button>("L_English").image.color = ManaColor.LightGray;
+                ManaReso.Get<Button>("L_TraChi").image.color = Shortcut.Orange;
+                ManaReso.Get<Button>("L_SimChi").image.color = Shortcut.LightGray;
+                ManaReso.Get<Button>("L_English").image.color = Shortcut.LightGray;
 
                 ManaLan.SwitchLanguage(Lan.ChineseTraditional);
             }
@@ -1550,9 +1552,9 @@ public class ManaUI : Regist
                 ManaReso.Get<Button>("L_SimChi").interactable = false;
                 ManaReso.Get<Button>("L_English").interactable = true;
 
-                ManaReso.Get<Button>("L_TraChi").image.color = ManaColor.LightGray;
-                ManaReso.Get<Button>("L_SimChi").image.color = ManaColor.Orange;
-                ManaReso.Get<Button>("L_English").image.color = ManaColor.LightGray;
+                ManaReso.Get<Button>("L_TraChi").image.color = Shortcut.LightGray;
+                ManaReso.Get<Button>("L_SimChi").image.color = Shortcut.Orange;
+                ManaReso.Get<Button>("L_English").image.color = Shortcut.LightGray;
 
                 ManaLan.SwitchLanguage(Lan.ChineseSimplified);
             }
@@ -1572,9 +1574,9 @@ public class ManaUI : Regist
                 ManaReso.Get<Button>("L_SimChi").interactable = true;
                 ManaReso.Get<Button>("L_English").interactable = false;
 
-                ManaReso.Get<Button>("L_TraChi").image.color = ManaColor.LightGray;
-                ManaReso.Get<Button>("L_SimChi").image.color = ManaColor.LightGray;
-                ManaReso.Get<Button>("L_English").image.color = ManaColor.Orange;
+                ManaReso.Get<Button>("L_TraChi").image.color = Shortcut.LightGray;
+                ManaReso.Get<Button>("L_SimChi").image.color = Shortcut.LightGray;
+                ManaReso.Get<Button>("L_English").image.color = Shortcut.Orange;
 
                 ManaLan.SwitchLanguage(Lan.English);
             }

+ 18 - 5
Assets/Script/Manage/ManaVisit.cs

@@ -449,10 +449,8 @@ public class ManaVisit
 
         List<KV<int, int>> plantList = Data.GetPlantList(Node);
         
-        Debug.Log("Count" + ManaGarden.PlantList.Count);
         for (int i = 0; i < plantList.Count; i++)
         {
-            Debug.Log("Plant : " + plantList[i].Key + " " + plantList[i].Value);
             ManaGarden.PlantFlower(plantList[i].Key, plantList[i].Value);
         }
 
@@ -511,18 +509,33 @@ public class ManaVisit
 
     public static void GetArchive()
     {
-        ManaServer.Random
+        ManaServer.Load
         (
+            "hsoiv1",
             (jsonData) =>
             {
                 LoadFinish = true;
-                
+
                 XmlStr = jsonData["l"].ToString();
-                
+
                 Enter();
             }
         );
 
+
+        //ManaServer.Random
+        //(
+        //    (jsonData) =>
+        //    {
+        //        LoadFinish = true;
+
+        //        XmlStr = jsonData["l"].ToString();
+
+        //        Enter();
+        //    }
+        //);
+
+
         //if (Random.Range(0f, 1f) <= CreatePosi)
         //{
         //    XmlDocument document = new XmlDocument();

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

@@ -15,7 +15,7 @@ public class Elf : Regist
 
     public void Save()
     {
-        Flower.ElfList.Remove(transform);
+        Flower.ElfList.Remove(Root);
 
         ManaReso.Save(Root);
     }

+ 5 - 0
Assets/Script/Object/Flower.cs

@@ -530,6 +530,11 @@ public class Flower : Regist, IPointerClickHandler
 
     public void OnPointerClick(PointerEventData eventData)
     {
+        if (ManaVisit.Visit)
+        {
+            return;
+        }
+
         if (eventData.rawPointerPress.transform == transform)
         {
             ManaReso.Get("G_Flower").TweenForCG();

+ 32 - 30
Assets/Script/Object/Skill/Ability.cs

@@ -176,11 +176,11 @@ public class Ability : SkillRoot
                 {
                     NewUpgradeAmt = Auxiliary.FmlParse(UpgradeFml, "a", NewUpgradeAmt.ToString());
                 }
-
+                
                 UpgradeValue(ref NewPlus, Plus, UpgradePlus, Level - 1);
-                UpgradeValue(ref NewSkillCdBuff, UpgradeCD, Level - 1);
+                UpgradeSkillCdBuff(ref NewSkillCdBuff, UpgradeCD, Level - 1);
                 UpgradeValue(ref NewPersonBuff, PersonBuff, UpgradePerson, Level - 1);
-
+                
                 UpgradeValue(ref NewPerson, Person, UpgradePerson, Level - 1);
                 UpgradeValue(ref NewSkillCD, SkillCD, UpgradeCD, Level - 1);
                 UpgradeValue(ref NewCoinPerson, CoinPerson, UpgradePlus, Level - 1);
@@ -250,21 +250,13 @@ public class Ability : SkillRoot
             }
         }
 
-        if (ID == "Ability1")
-        {
-            ManaData.Person += NewPerson;
-            ManaData.CoinPerson += NewCoinPerson;
-        }
-        else
-        {
-            ManaData.SkillPerson += NewPerson;
-            ManaData.SkillCoinPerson += NewCoinPerson;
-        }
+        ManaData.Person += NewPerson;
+        ManaData.CoinPerson += NewCoinPerson;
 
         ManaData.SkillPlus += NewPlus;
         ManaData.SkillPersonBuff += NewPersonBuff;
 
-        if (Math.Abs(NewSkillCD) > 0.0005f)
+        if (!NewSkillCD.Equal(0))
         {
             for (int i = 0; i < ManaData.SkillList.Count; i++)
             {
@@ -272,7 +264,7 @@ public class Ability : SkillRoot
             }
         }
 
-        if (Math.Abs(NewSkillCdBuff) > 0.0005f)
+        if (!NewSkillCdBuff.Equal(0))
         {
             for (int i = 0; i < ManaData.SkillList.Count; i++)
             {
@@ -475,7 +467,7 @@ public class Ability : SkillRoot
             UpgradeValue(ref NewCoinPerson, CoinPerson, UpgradePlus, 1);
 
             UpgradeValue(ref NewPlus, Plus, UpgradePlus, 1);
-            UpgradeValue(ref NewSkillCdBuff, UpgradeCD, 1);
+            UpgradeSkillCdBuff(ref NewSkillCdBuff, UpgradeCD, 1);
             UpgradeValue(ref NewPersonBuff, PersonBuff, UpgradePerson, 1);
 
             UseA();
@@ -510,16 +502,8 @@ public class Ability : SkillRoot
 
     public override void Annul()
     {
-        if (ID == "Ability1")
-        {
-            ManaData.Person -= NewPerson;
-            ManaData.CoinPerson -= NewCoinPerson;
-        }
-        else
-        {
-            ManaData.SkillPerson -= NewPerson;
-            ManaData.SkillCoinPerson -= NewCoinPerson;
-        }
+        ManaData.Person -= NewPerson;
+        ManaData.CoinPerson -= NewCoinPerson;
 
         ManaData.SkillPlus -= NewPlus;
         ManaData.SkillPersonBuff -= NewPersonBuff;
@@ -604,7 +588,16 @@ public class Ability : SkillRoot
 
                     UpgradeUnit(ref temp, strings[i]);
 
-                    stringBuilder.Append(temp.ToString("0"));
+                    float remainder = temp % 1;
+
+                    if (remainder > 0)
+                    {
+                        stringBuilder.Append(temp.ToString("0") + "+");
+                    }
+                    else
+                    {
+                        stringBuilder.Append(temp.ToString("0"));
+                    }
                 }
                 else if (Math.Abs(PersonBuff) > 0.0005f)
                 {
@@ -635,8 +628,8 @@ public class Ability : SkillRoot
                 {
                     temp = NewSkillCdBuff;
 
-                    UpgradeValue(ref temp, UpgradeCD, offset);
-
+                    UpgradeSkillCdBuff(ref temp, UpgradeCD, offset);
+                    
                     stringBuilder.Append(string.Format("{0:0}%", temp * 100));
                 }
 
@@ -654,7 +647,16 @@ public class Ability : SkillRoot
 
                     UpgradeUnit(ref temp, strings[i]);
 
-                    stringBuilder.Append(temp.ToString("0"));
+                    float remainder = temp % 1;
+
+                    if (remainder > 0)
+                    {
+                        stringBuilder.Append(temp.ToString("0") + "+");
+                    }
+                    else
+                    {
+                        stringBuilder.Append(temp.ToString("0"));
+                    }
                 }
                 else if (Math.Abs(Plus) > 0.0005f)
                 {

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

@@ -100,7 +100,7 @@ public class BigSkill : Skill
 
     public override void Annul()
     {
-        CoolTimer = CD * (1 + CdBuff);
+        CoolTimer = CD * CdBuff;
 
         //BarLab.color = Color.white;
 
@@ -227,7 +227,7 @@ public class BigSkill : Skill
                 }
 
                 UpgradeValue(ref NewPlus, Plus, UpgradePlus, Level - 1);
-                UpgradeValue(ref NewSkillCdBuff, UpgradeCD, Level - 1);
+                UpgradeSkillCdBuff(ref NewSkillCdBuff, UpgradeCD, Level - 1);
                 UpgradeValue(ref NewPersonBuff, PersonBuff, UpgradePerson, Level - 1);
                 UpgradeValue(ref NewCoinOnceBuff, UpgradeCoinOnce, Level - 1);
 
@@ -309,7 +309,7 @@ public class BigSkill : Skill
         {
             if (buff)
             {
-                CdBuff -= amt;
+                CdBuff = 1 - amt;
             }
             else
             {
@@ -395,7 +395,7 @@ public class BigSkill : Skill
             NewUpgradeAmt = Auxiliary.FmlParse(UpgradeFml, "a", NewUpgradeAmt.ToString());
 
             UpgradeValue(ref NewPlus, Plus, UpgradePlus, 1);
-            UpgradeValue(ref NewSkillCdBuff, UpgradeCD, 1);
+            UpgradeSkillCdBuff(ref NewSkillCdBuff, UpgradeCD, 1);
             UpgradeValue(ref NewPersonBuff, PersonBuff, UpgradePerson, 1);
             UpgradeValue(ref NewCoinOnceBuff, UpgradeCoinOnce, 1);
 
@@ -439,7 +439,7 @@ public class BigSkill : Skill
             UseA();
             UseB();
 
-            ManaInfo.Show(String.Format("{0}{1}", Language.GetStr("UI", "J_Info1"), Language.GetStr("SkillName", ID)), 2f);
+            ManaInfo.Show(String.Format("{0}{1}", Language.GetStr("UI", "J_Info1"), Language.GetStr("SkillName", ID)), 10f);
         });
     }
 

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

@@ -311,7 +311,7 @@ public class Pack : SkillRoot
 
         if (!string.IsNullOrEmpty(str))
         {
-            ManaInfo.Show(str, 2f);
+            ManaInfo.Show(str, 10f);
         }
 
         Level++;

+ 25 - 7
Assets/Script/Object/Skill/Skill.cs

@@ -35,7 +35,7 @@ public class Skill : SkillRoot
     protected double UpgradeAmt;
 
     protected float Plus;
-    protected float CdBuff;
+    protected float CdBuff = 1;
     protected float PersonBuff;
     protected float SkillCdBuff;
     protected float CoinOnceBuff;
@@ -203,7 +203,7 @@ public class Skill : SkillRoot
 
     public override void Annul()
     {
-        CoolTimer = CD * (1 + CdBuff);
+        CoolTimer = CD * CdBuff;
         
         ManaData.CoolList.Add(this);
 
@@ -298,7 +298,7 @@ public class Skill : SkillRoot
 
         if (!string.IsNullOrEmpty(str))
         {
-            ManaInfo.Show(sb.ToString(), 2f);
+            ManaInfo.Show(sb.ToString(), 10f);
         }
     }
 
@@ -328,7 +328,7 @@ public class Skill : SkillRoot
             UseA();
             UseB();
 
-            ManaInfo.Show(String.Format("{0}{1}", Language.GetStr("UI", "J_Info1"), Language.GetStr("SkillName", ID)), 2f);
+            ManaInfo.Show(String.Format("{0}{1}", Language.GetStr("UI", "J_Info1"), Language.GetStr("SkillName", ID)), 10f);
         });
     }
 
@@ -516,7 +516,7 @@ public class Skill : SkillRoot
         {
             if (buff)
             {
-                CdBuff -= amt;
+                CdBuff = 1 - amt;
             }
             else
             {
@@ -563,7 +563,16 @@ public class Skill : SkillRoot
                     UpgradeValue(ref temp, Person, UpgradePerson, offset);
                     UpgradeUnit(ref temp, strings[i]);
 
-                    stringBuilder.Append(temp.ToString("0"));
+                    float remainder = temp % 1;
+
+                    if (remainder > 0)
+                    {
+                        stringBuilder.Append(temp.ToString("0") + "+");
+                    }
+                    else
+                    {
+                        stringBuilder.Append(temp.ToString("0"));
+                    }
                 }
                 else if (Math.Abs(PersonBuff) > 0.0005f)
                 {
@@ -631,7 +640,16 @@ public class Skill : SkillRoot
 
                     UpgradeValue(ref temp, CoinPerson, UpgradePlus, offset);
 
-                    stringBuilder.Append(temp.ToString("0"));
+                    float remainder = temp % 1;
+
+                    if (remainder > 0)
+                    {
+                        stringBuilder.Append(temp.ToString("0") + "+");
+                    }
+                    else
+                    {
+                        stringBuilder.Append(temp.ToString("0"));
+                    }
                 }
                 else if (Math.Abs(Plus) > 0.0005f)
                 {

+ 13 - 0
Assets/Script/Object/Skill/SkillRoot.cs

@@ -347,6 +347,19 @@ public abstract class SkillRoot
         }
     }
 
+    protected void UpgradeSkillCdBuff(ref float target, string fml, int offset)
+    {
+        if (fml.Contains("%"))
+        {
+            float unit = (float.Parse(fml.Replace("%", "")))/100;
+
+            for (int i = 0; i < offset; i++)
+            {
+                target += (1 - target) * unit;
+            }
+        }
+    }
+
 
     protected void ValueBuffParse(out float value, out float buff, string str)
     {

+ 25 - 25
Assets/Script/Object/Tutorial.cs

@@ -48,7 +48,7 @@ public class Tutorial : Regist, IPointerClickHandler
 
         PointScreen(arrowPos.position, target);
 
-        ManaReso.Get("N_Mask").TweenConForGra();
+        ManaReso.Get("N_Mask").TweenForGra();
 
 
         HighLightList.Add(target);
@@ -68,7 +68,7 @@ public class Tutorial : Regist, IPointerClickHandler
 
         PointScreen(arrowPos.position, targetPos);
 
-        ManaReso.Get("N_Mask").TweenConForGra();
+        ManaReso.Get("N_Mask").TweenForGra();
 
 
         HighLightList.Add(target);
@@ -88,8 +88,8 @@ public class Tutorial : Regist, IPointerClickHandler
         HighLightList = new List<Transform>();
 
 
-        ManaReso.Get("N_Mask").TweenConBacGra();
-        ManaReso.Get("N_Arrow").TweenConBacCG();
+        ManaReso.Get("N_Mask").TweenBacGra();
+        ManaReso.Get("N_Arrow").TweenBacCG();
 
         ClearArea();
 
@@ -108,7 +108,7 @@ public class Tutorial : Regist, IPointerClickHandler
 
         if (hideArrow)
         {
-            ManaReso.Get("N_Arrow").TweenConBacCG();
+            ManaReso.Get("N_Arrow").TweenBacCG();
         }
     }
 
@@ -155,7 +155,7 @@ public class Tutorial : Regist, IPointerClickHandler
 
         Arrow.right = pointPos - Arrow.position;
 
-        Arrow.TweenConForCG();
+        Arrow.TweenForCG();
     }
 
     public static void PointScreen(Vector3 pos, Transform tra)
@@ -164,7 +164,7 @@ public class Tutorial : Regist, IPointerClickHandler
 
         Arrow.right = tra.position - Arrow.position;
 
-        Arrow.TweenConForCG();
+        Arrow.TweenForCG();
     }
 
 
@@ -185,13 +185,13 @@ public class Tutorial : Regist, IPointerClickHandler
             ManaReso.Get("PlayerBk2").MoveOffset2D(offset, 1f, false, Curve.EaseOutQuad);
             ManaReso.Get("PlayerBk3").MoveOffset2D(offset, 1f, false, Curve.EaseOutQuad);
 
-            ManaReso.Get("PlayerBk1").TweenConForScale();
-            ManaReso.Get("PlayerBk2").TweenConBacScale();
-            ManaReso.Get("PlayerBk3").TweenConBacScale();
+            ManaReso.Get("PlayerBk1").TweenForScale();
+            ManaReso.Get("PlayerBk2").TweenBacScale();
+            ManaReso.Get("PlayerBk3").TweenBacScale();
 
-            ManaPlayer.PlayerPink.TweenConBacScale();
-            ManaPlayer.PlayerBlond.TweenConBacScale();
-            ManaPlayer.PlayerBrown.TweenConForScale();
+            ManaPlayer.PlayerPink.TweenBacScale();
+            ManaPlayer.PlayerBlond.TweenBacScale();
+            ManaPlayer.PlayerBrown.TweenForScale();
 
             ManaPlayer.SelePlayer = "PlayerBrown";
             ManaPlayer.SelePlayerTra = ManaPlayer.PlayerBrown;
@@ -210,13 +210,13 @@ public class Tutorial : Regist, IPointerClickHandler
             ManaReso.Get("PlayerBk2").MoveOffset2D(offset, 1f, false, Curve.EaseOutQuad);
             ManaReso.Get("PlayerBk3").MoveOffset2D(offset, 1f, false, Curve.EaseOutQuad);
 
-            ManaReso.Get("PlayerBk2").TweenConForScale();
-            ManaReso.Get("PlayerBk1").TweenConBacScale();
-            ManaReso.Get("PlayerBk3").TweenConBacScale();
+            ManaReso.Get("PlayerBk2").TweenForScale();
+            ManaReso.Get("PlayerBk1").TweenBacScale();
+            ManaReso.Get("PlayerBk3").TweenBacScale();
 
-            ManaPlayer.PlayerPink.TweenConBacScale();
-            ManaPlayer.PlayerBlond.TweenConForScale();
-            ManaPlayer.PlayerBrown.TweenConBacScale();
+            ManaPlayer.PlayerPink.TweenBacScale();
+            ManaPlayer.PlayerBlond.TweenForScale();
+            ManaPlayer.PlayerBrown.TweenBacScale();
 
             ManaPlayer.SelePlayer = "PlayerBlond";
             ManaPlayer.SelePlayerTra = ManaPlayer.PlayerBlond;
@@ -235,13 +235,13 @@ public class Tutorial : Regist, IPointerClickHandler
             ManaReso.Get("PlayerBk2").MoveOffset2D(offset, 1f, false, Curve.EaseOutQuad);
             ManaReso.Get("PlayerBk3").MoveOffset2D(offset, 1f, false, Curve.EaseOutQuad);
 
-            ManaReso.Get("PlayerBk3").TweenConForScale();
-            ManaReso.Get("PlayerBk1").TweenConBacScale();
-            ManaReso.Get("PlayerBk2").TweenConBacScale();
+            ManaReso.Get("PlayerBk3").TweenForScale();
+            ManaReso.Get("PlayerBk1").TweenBacScale();
+            ManaReso.Get("PlayerBk2").TweenBacScale();
 
-            ManaPlayer.PlayerPink.TweenConForScale();
-            ManaPlayer.PlayerBlond.TweenConBacScale();
-            ManaPlayer.PlayerBrown.TweenConBacScale();
+            ManaPlayer.PlayerPink.TweenForScale();
+            ManaPlayer.PlayerBlond.TweenBacScale();
+            ManaPlayer.PlayerBrown.TweenBacScale();
 
             ManaPlayer.SelePlayer = "PlayerPink";
             ManaPlayer.SelePlayerTra = ManaPlayer.PlayerPink;

+ 4 - 4
Assets/Script/Tool/Anim/Move.cs

@@ -1,7 +1,7 @@
 using UnityEngine;
+using UnityEngine.Events;
 
 using System.Collections;
-using UnityEngine.Events;
 
 public abstract class Move 
 {
@@ -9,11 +9,11 @@ public abstract class Move
 
     public virtual bool InDestination
     {
-        get { return _InDestination; }
-        set { _InDestination = value; }
+        get { return InDestination_; }
+        set { InDestination_ = value; }
     }
 
-    public bool _InDestination;
+    public bool InDestination_;
 
     public UnityAction OnForwardStart;
     public UnityAction OnForwardFinish;

+ 8 - 8
Assets/Script/Tool/Anim/Move2D.cs

@@ -16,41 +16,41 @@ public class Move2D : Move
             {
                 if (Target.localPosition.Equal(Destination))
                 {
-                    _InDestination = true;
+                    InDestination_ = true;
                 }
                 else
                 {
-                    _InDestination = false;
+                    InDestination_ = false;
                 }
             }
             else
             {
                 if (Target.position.Equal(Destination))
                 {
-                    _InDestination = true;
+                    InDestination_ = true;
                 }
                 else
                 {
-                    _InDestination = false;
+                    InDestination_ = false;
                 }
             }
 
-            return _InDestination;
+            return InDestination_;
         }
         set
         {
-            _InDestination = value;
+            InDestination_ = value;
 
             if (Local)
             {
-                if (_InDestination)
+                if (InDestination_)
                 {
                     Target.localPosition = Destination;
                 }
             }
             else
             {
-                if (_InDestination)
+                if (InDestination_)
                 {
                     Target.position = Destination;
                 }

+ 8 - 8
Assets/Script/Tool/Anim/Move3D.cs

@@ -16,41 +16,41 @@ public class Move3D : Move
             {
                 if (Target.localPosition.Equal(Destination))
                 {
-                    _InDestination = true;
+                    InDestination_ = true;
                 }
                 else
                 {
-                    _InDestination = false;
+                    InDestination_ = false;
                 }
             }
             else
             {
                 if (Target.position.Equal(Destination))
                 {
-                    _InDestination = true;
+                    InDestination_ = true;
                 }
                 else
                 {
-                    _InDestination = false;
+                    InDestination_ = false;
                 }
             }
 
-            return _InDestination;
+            return InDestination_;
         }
         set
         {
-            _InDestination = value;
+            InDestination_ = value;
 
             if (Local)
             {
-                if (_InDestination)
+                if (InDestination_)
                 {
                     Target.localPosition = Destination;
                 }
             }
             else
             {
-                if (_InDestination)
+                if (InDestination_)
                 {
                     Target.position = Destination;
                 }

+ 5 - 5
Assets/Script/Tool/Anim/Shake.cs

@@ -15,20 +15,20 @@ public class Shake : Move
         {
             if (Target.position.Equal(Origin))
             {
-                _InDestination = true;
+                InDestination_ = true;
             }
             else
             {
-                _InDestination = false;
+                InDestination_ = false;
             }
 
-            return _InDestination;
+            return InDestination_;
         }
         set
         {
-            _InDestination = value;
+            InDestination_ = value;
 
-            if (_InDestination)
+            if (InDestination_)
             {
                 Target.position = Origin;
             }

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

@@ -66,7 +66,7 @@ public class StreamFont : Tween
                     Target.fontSize = DestKvList[0].Key;
                 }
 
-                FinishBackward();
+                BackwardFinish();
             }
         }
     }
@@ -115,7 +115,7 @@ public class StreamFont : Tween
                     Target.fontSize = DestKvList.Last(0).Value;
                 }
 
-                FinishForward();
+                ForwardFinish();
             }
         }
     }
@@ -264,8 +264,6 @@ public class StreamFont : Tween
         {
             if (Timer > TempDuration)
             {
-                FinishForward();
-
                 Timer = 0;
 
                 InForward = false;

+ 3 - 5
Assets/Script/Tool/Anim/StreamScale.cs

@@ -1,10 +1,10 @@
 using UnityEngine;
 using UnityEngine.UI;
+using UnityEngine.Events;
 
 using System;
 using System.Collections;
 using System.Collections.Generic;
-using UnityEngine.Events;
 
 public struct VecPair
 {
@@ -72,7 +72,7 @@ public class StreamScale : Tween
                     Target.localScale = DestKvList[0].Key;
                 }
 
-                FinishBackward();
+                BackwardFinish();
             }
         }
     }
@@ -121,7 +121,7 @@ public class StreamScale : Tween
                     Target.localScale = DestKvList.Last(0).Value;
                 }
 
-                FinishForward();
+                ForwardFinish();
             }
         }
     }
@@ -270,8 +270,6 @@ public class StreamScale : Tween
         {
             if (Timer > TempDuration)
             {
-                FinishForward();
-
                 Timer = 0;
 
                 InForward = false;

+ 42 - 19
Assets/Script/Tool/Anim/Tween.cs

@@ -22,6 +22,8 @@ public abstract class Tween
     public bool _InDestination;
 
     public bool CG;
+    public bool Loop;
+    public bool PingPong;
     public bool InForward;
     public bool InBackward;
     public Curve Curve;
@@ -83,6 +85,7 @@ public abstract class Tween
     public void ReForward()
     {
         Timer = 0;
+        InOrigin = true;
 
         if (InBackward)
         {
@@ -90,7 +93,7 @@ public abstract class Tween
 
             ManaAnim.TweenBacList.Remove(this);
         }
-
+        
         if (!InForward)
         {
             StartForward();
@@ -100,6 +103,7 @@ public abstract class Tween
     public void ReBackward()
     {
         Timer = 0;
+        InDestination = true;
 
         if (InForward)
         {
@@ -115,25 +119,15 @@ public abstract class Tween
     }
 
 
-    public void ConfineForward()
-    {
-        if (!InDestination)
-        {
-            StartForward();
-        }
-    }
-
-    public void ConfineBackward()
+    public virtual void StartForward()
     {
-        if (!InOrigin)
+        if (InForward || InDestination)
         {
-            StartBackward();
+            return;
         }
-    }
 
+        Timer = 0;
 
-    public virtual void StartForward()
-    {
         InForward = true;
 
         Component.SetActive(true);
@@ -153,11 +147,18 @@ public abstract class Tween
             ManaAnim.TweenBacList.Remove(this);
         }
         
-        ManaAnim.TweenForList.UniqueAdd(this);
+        ManaAnim.TweenForList.Add(this);
     }
 
     public virtual void StartBackward()
     {
+        if (InBackward || InOrigin)
+        {
+            return;
+        }
+
+        Timer = 0;
+
         InBackward = true;
 
         Component.SetActive(true);
@@ -177,11 +178,11 @@ public abstract class Tween
             ManaAnim.TweenForList.Remove(this);
         }
 
-        ManaAnim.TweenBacList.UniqueAdd(this);
+        ManaAnim.TweenBacList.Add(this);
     }
 
 
-    protected void FinishForward()
+    protected void ForwardFinish()
     {
         Component.SetActive(DestActive);
 
@@ -189,9 +190,20 @@ public abstract class Tween
         {
             CanvasGroup.interactable = DestActive;
         }
+
+        if (Loop)
+        {
+            ManaAnim.TweenForList.Add(this);
+
+            ReForward();
+        }
+        else if (PingPong)
+        {
+            StartBackward();
+        }
     }
 
-    protected void FinishBackward()
+    protected void BackwardFinish()
     {
         Component.SetActive(OriginActive);
 
@@ -199,6 +211,17 @@ public abstract class Tween
         {
             CanvasGroup.interactable = OriginActive;
         }
+
+        if (Loop)
+        {
+            ManaAnim.TweenBacList.Add(this);
+
+            ReBackward();
+        }
+        else if (PingPong)
+        {
+            StartForward();
+        }
     }
 
 

+ 2 - 10
Assets/Script/Tool/Anim/TweenAudio.cs

@@ -30,7 +30,7 @@ public class TweenAudio : Tween
             {
                 Target.volume = Origin;
 
-                FinishBackward();
+                BackwardFinish();
             }
         }
     }
@@ -58,7 +58,7 @@ public class TweenAudio : Tween
             {
                 Target.volume = Destination;
 
-                FinishForward();
+                ForwardFinish();
             }
         }
     }
@@ -114,10 +114,6 @@ public class TweenAudio : Tween
 
         if (Timer > Duration)
         {
-            FinishForward();
-
-            Timer = 0;
-
             InForward = false;
             InDestination = true;
 
@@ -142,10 +138,6 @@ public class TweenAudio : Tween
 
         if (Timer > Duration)
         {
-            FinishBackward();
-
-            Timer = 0;
-
             InBackward = false;
             InOrigin = true;
 

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

@@ -30,7 +30,7 @@ public class TweenCG : Tween
             {
                 Target.alpha = Origin;
 
-                FinishBackward();
+                BackwardFinish();
             }
         }
     }
@@ -58,7 +58,7 @@ public class TweenCG : Tween
             {
                 Target.alpha = Destination;
 
-                FinishForward();
+                ForwardFinish();
             }
         }
     }
@@ -113,10 +113,6 @@ public class TweenCG : Tween
 
         if (Timer > Duration)
         {
-            FinishForward();
-
-            Timer = 0;
-
             InForward = false;
             InDestination = true;
 
@@ -141,10 +137,6 @@ public class TweenCG : Tween
 
         if (Timer > Duration)
         {
-            FinishBackward();
-
-            Timer = 0;
-
             InBackward = false;
             InOrigin = true;
 

+ 2 - 10
Assets/Script/Tool/Anim/TweenFont.cs

@@ -31,7 +31,7 @@ public class TweenFont : Tween
             {
                 Target.fontSize = (int)Origin;
 
-                FinishBackward();
+                BackwardFinish();
             }
         }
     }
@@ -59,7 +59,7 @@ public class TweenFont : Tween
             {
                 Target.fontSize = (int)Destination;
 
-                FinishForward();
+                ForwardFinish();
             }
         }
     }
@@ -115,10 +115,6 @@ public class TweenFont : Tween
 
         if (Timer > Duration)
         {
-            FinishForward();
-
-            Timer = 0;
-
             InForward = false;
             InDestination = true;
 
@@ -143,10 +139,6 @@ public class TweenFont : Tween
 
         if (Timer > Duration)
         {
-            FinishBackward();
-
-            Timer = 0;
-
             InBackward = false;
             InOrigin = true;
 

+ 2 - 10
Assets/Script/Tool/Anim/TweenGra.cs

@@ -31,7 +31,7 @@ public class TweenGra : Tween
             {
                 Target.color = Origin;
 
-                FinishBackward();
+                BackwardFinish();
             }
         }
     }
@@ -59,7 +59,7 @@ public class TweenGra : Tween
             {
                 Target.color = Destination;
 
-                FinishForward();
+                ForwardFinish();
             }
         }
     }
@@ -114,10 +114,6 @@ public class TweenGra : Tween
 
         if (Timer > Duration)
         {
-            FinishForward();
-
-            Timer = 0;
-
             InForward = false;
             InDestination = true;
 
@@ -142,10 +138,6 @@ public class TweenGra : Tween
 
         if (Timer > Duration)
         {
-            FinishBackward();
-
-            Timer = 0;
-
             InBackward = false;
             InOrigin = true;
 

+ 2 - 10
Assets/Script/Tool/Anim/TweenNumber.cs

@@ -32,7 +32,7 @@ public class TweenNumber : Tween
             {
                 Target.text = Origin.ToString();
 
-                FinishBackward();
+                BackwardFinish();
             }
         }
     }
@@ -60,7 +60,7 @@ public class TweenNumber : Tween
             {
                 Target.text = Destination.ToString();
 
-                FinishForward();
+                ForwardFinish();
             }
         }
     }
@@ -117,10 +117,6 @@ public class TweenNumber : Tween
 
         if (Timer > Duration)
         {
-            FinishForward();
-
-            Timer = 0;
-
             InForward = false;
             InDestination = true;
 
@@ -145,10 +141,6 @@ public class TweenNumber : Tween
 
         if (Timer > Duration)
         {
-            FinishBackward();
-
-            Timer = 0;
-
             InBackward = false;
             InOrigin = true;
 

+ 6 - 10
Assets/Script/Tool/Anim/TweenOutline.cs

@@ -31,7 +31,7 @@ public class TweenOutline : Tween
             {
                 Target.effectColor = Origin;
 
-                FinishBackward();
+                BackwardFinish();
             }
         }
     }
@@ -59,7 +59,7 @@ public class TweenOutline : Tween
             {
                 Target.effectColor = Destination;
 
-                FinishForward();
+                ForwardFinish();
             }
         }
     }
@@ -92,6 +92,8 @@ public class TweenOutline : Tween
     {
         base.StartForward();
 
+        Target.enabled = true;
+
         if (InBackward)
         {
             Timer = ManaAnim.GetTimerColor(Target.effectColor, Duration, Origin, Delta, Curve);
@@ -102,6 +104,8 @@ public class TweenOutline : Tween
     {
         base.StartBackward();
 
+        Target.enabled = true;
+
         if (InForward)
         {
             Timer = ManaAnim.GetTimerColor(Target.effectColor, Duration, Destination, new Color(-Delta.r, -Delta.g, -Delta.b, -Delta.a), Curve);
@@ -114,10 +118,6 @@ public class TweenOutline : Tween
 
         if (Timer > Duration)
         {
-            FinishForward();
-
-            Timer = 0;
-
             InForward = false;
             InDestination = true;
 
@@ -142,10 +142,6 @@ public class TweenOutline : Tween
 
         if (Timer > Duration)
         {
-            FinishBackward();
-
-            Timer = 0;
-
             InBackward = false;
             InOrigin = true;
 

+ 4 - 12
Assets/Script/Tool/Anim/TweenRect.cs

@@ -29,7 +29,7 @@ public class TweenRect : Tween
             {
                 Target.sizeDelta = Origin;
 
-                FinishBackward();
+                BackwardFinish();
             }
         }
     }
@@ -57,7 +57,7 @@ public class TweenRect : Tween
             {
                 Target.sizeDelta = Destination;
 
-                FinishForward();
+                ForwardFinish();
             }
         }
     }
@@ -93,7 +93,7 @@ public class TweenRect : Tween
 
         if (InBackward)
         {
-            Timer = ManaAnim.GetTimerVec3(Target.sizeDelta, Duration, Origin, Delta, Curve);
+            Timer = ManaAnim.GetTimerVec(Target.sizeDelta, Duration, Origin, Delta, Curve);
         }
     }
 
@@ -103,7 +103,7 @@ public class TweenRect : Tween
 
         if (InForward)
         {
-            Timer = ManaAnim.GetTimerVec3(Target.sizeDelta, Duration, Destination, -Delta, Curve);
+            Timer = ManaAnim.GetTimerVec(Target.sizeDelta, Duration, Destination, -Delta, Curve);
         }
     }
 
@@ -113,10 +113,6 @@ public class TweenRect : Tween
 
         if (Timer > Duration)
         {
-            FinishForward();
-
-            Timer = 0;
-
             InForward = false;
             InDestination = true;
 
@@ -141,10 +137,6 @@ public class TweenRect : Tween
 
         if (Timer > Duration)
         {
-            FinishBackward();
-
-            Timer = 0;
-
             InBackward = false;
             InOrigin = true;
 

+ 4 - 12
Assets/Script/Tool/Anim/TweenScale.cs

@@ -30,7 +30,7 @@ public class TweenScale : Tween
             {
                 Target.localScale = Origin;
 
-                FinishBackward();
+                BackwardFinish();
             }
         }
     }
@@ -58,7 +58,7 @@ public class TweenScale : Tween
             {
                 Target.localScale = Destination;
 
-                FinishForward();
+                ForwardFinish();
             }
         }
     }
@@ -93,14 +93,14 @@ public class TweenScale : Tween
     {
         base.StartForward();
 
-        Timer = ManaAnim.GetTimerVec3(Target.localScale, Duration, Origin, Delta, Curve);
+        Timer = ManaAnim.GetTimerVec(Target.localScale, Duration, Origin, Delta, Curve);
     }
 
     public override void StartBackward()
     {
         base.StartBackward();
 
-        Timer = ManaAnim.GetTimerVec3(Target.localScale, Duration, Destination, -Delta, Curve);
+        Timer = ManaAnim.GetTimerVec(Target.localScale, Duration, Destination, -Delta, Curve);
     }
 
     public override bool DoForward()
@@ -109,10 +109,6 @@ public class TweenScale : Tween
 
         if (Timer > Duration)
         {
-            FinishForward();
-
-            Timer = 0;
-
             InForward = false;
             InDestination = true;
 
@@ -137,10 +133,6 @@ public class TweenScale : Tween
 
         if (Timer > Duration)
         {
-            FinishBackward();
-
-            Timer = 0;
-
             InBackward = false;
             InOrigin = true;
 

+ 92 - 42
Assets/Script/Tool/Anim/TweenSr.cs

@@ -1,6 +1,8 @@
 using UnityEngine;
 
+using System.Linq;
 using System.Collections;
+using System.Collections.Generic;
 
 public class TweenSr : Tween 
 {
@@ -31,22 +33,22 @@ public class TweenSr : Tween
 
                 if (Group)
                 {
-                    Renderer[] renderers = Target.GetComponentsInChildren<Renderer>();
+                    for (int i = 0; i < ChildList.Count; i++)
+                    {
+                        if (ChildList[i].transform.parent != Target.transform)
+                        {
+                            ChildList.RemoveAt(i--);
 
-                    Targets = new Material[renderers.Length];
+                            continue;
+                        }
 
-                    for (int i = 0; i < renderers.Length; i++)
-                    {
-                        Targets[i] = renderers[i].material;
-                    }
+                        Color selfColor = ColorDic[ChildList[i]];
 
-                    for (int i = 1; i < Targets.Length; i++)
-                    {
-                        Targets[i].SetAlpha(Target.color.a, "_Color");
+                        ChildList[i].material.SetColor("_Color", selfColor * Target.color);
                     }
                 }
 
-                FinishBackward();
+                BackwardFinish();
             }
         }
     }
@@ -76,22 +78,22 @@ public class TweenSr : Tween
 
                 if (Group)
                 {
-                    Renderer[] renderers = Target.GetComponentsInChildren<Renderer>();
+                    for (int i = 0; i < ChildList.Count; i++)
+                    {
+                        if (ChildList[i].transform.parent != Target.transform)
+                        {
+                            ChildList.RemoveAt(i--);
 
-                    Targets = new Material[renderers.Length];
+                            continue;
+                        }
 
-                    for (int i = 0; i < renderers.Length; i++)
-                    {
-                        Targets[i] = renderers[i].material;
-                    }
+                        Color selfColor = ColorDic[ChildList[i]];
 
-                    for (int i = 1; i < Targets.Length; i++)
-                    {
-                        Targets[i].SetAlpha(Target.color.a, "_Color");
+                        ChildList[i].material.SetColor("_Color", selfColor * Target.color);
                     }
                 }
 
-                FinishForward();
+                ForwardFinish();
             }
         }
     }
@@ -100,10 +102,12 @@ public class TweenSr : Tween
     public Color Delta;
     public Color Origin;
     public Color Destination;
-    public Material[] Targets;
     public SpriteRenderer Target;
     public CurveFunctionC Func;
 
+    public List<Renderer> ChildList;
+    public Dictionary<Renderer, Color> ColorDic = new Dictionary<Renderer, Color>();
+
     #endregion
 
     public TweenSr(SpriteRenderer target, Color origin, Color destination, float duration, bool originActive, bool destActive, Curve curve,bool cg = false,bool group=false) : base(cg, curve, target)
@@ -131,11 +135,29 @@ public class TweenSr : Tween
         {
             Renderer[] renderers = Target.GetComponentsInChildren<Renderer>();
 
-            Targets = new Material[renderers.Length];
+            ChildList = new List<Renderer>();
+
+            for (int i = 1; i < renderers.Length; i++)
+            {
+                Renderer renderer = renderers[i];
+
+                ChildList.Add(renderer);
 
-            for (int i = 0; i < renderers.Length; i++)
+                if (!ColorDic.ContainsKey(renderer))
+                {
+                    ColorDic.Add(renderer, renderer.material.GetColor("_Color"));
+                }
+            }
+
+
+            List<Renderer> keyList = ColorDic.Keys.ToList();
+
+            for (int i = 0; i < keyList.Count; i++)
             {
-                Targets[i] = renderers[i].material;
+                if (!ChildList.Contains(keyList[i]))
+                {
+                    ColorDic.Remove(keyList[i]);
+                }
             }
         }
 
@@ -153,11 +175,29 @@ public class TweenSr : Tween
         {
             Renderer[] renderers = Target.GetComponentsInChildren<Renderer>();
 
-            Targets = new Material[renderers.Length];
-            
-            for (int i = 0; i < renderers.Length; i++)
+            ChildList = new List<Renderer>();
+
+            for (int i = 1; i < renderers.Length; i++)
             {
-                Targets[i] = renderers[i].material;
+                Renderer renderer = renderers[i];
+
+                ChildList.Add(renderer);
+
+                if (!ColorDic.ContainsKey(renderer))
+                {
+                    ColorDic.Add(renderer, renderer.material.GetColor("_Color"));
+                }
+            }
+
+
+            List<Renderer> keyList = ColorDic.Keys.ToList();
+
+            for (int i = 0; i < keyList.Count; i++)
+            {
+                if (!ChildList.Contains(keyList[i]))
+                {
+                    ColorDic.Remove(keyList[i]);
+                }
             }
         }
 
@@ -174,10 +214,6 @@ public class TweenSr : Tween
 
         if (Timer > Duration)
         {
-            FinishForward();
-
-            Timer = 0;
-
             InForward = false;
             InDestination = true;
 
@@ -191,15 +227,24 @@ public class TweenSr : Tween
         else
         {
             Target.color = Func(Timer, Duration, Origin, Delta);
-            
+
             if (Group)
             {
-                for (int i = 1; i < Targets.Length; i++)
+                for (int i = 0; i < ChildList.Count; i++)
                 {
-                    Targets[i].SetAlpha(Target.color.a, "_Color");
+                    if (ChildList[i].transform.parent != Target.transform)
+                    {
+                        ChildList.RemoveAt(i--);
+
+                        continue;
+                    }
+                    
+                    Color selfColor = ColorDic[ChildList[i]];
+
+                    ChildList[i].material.SetColor("_Color", selfColor * Target.color);
                 }
             }
-            
+
             return false;
         }
     }
@@ -210,10 +255,6 @@ public class TweenSr : Tween
 
         if (Timer > Duration)
         {
-            FinishBackward();
-
-            Timer = 0;
-
             InBackward = false;
             InOrigin = true;
 
@@ -230,9 +271,18 @@ public class TweenSr : Tween
 
             if (Group)
             {
-                for (int i = 1; i < Targets.Length; i++)
+                for (int i = 0; i < ChildList.Count; i++)
                 {
-                    Targets[i].SetAlpha(Target.color.a, "_Color");
+                    if (ChildList[i].transform.parent != Target.transform)
+                    {
+                        ChildList.RemoveAt(i--);
+
+                        continue;
+                    }
+
+                    Color selfColor = ColorDic[ChildList[i]];
+
+                    ChildList[i].material.SetColor("_Color", selfColor * Target.color);
                 }
             }
 

+ 4 - 12
Assets/Script/Tool/Anim/TweenVec.cs

@@ -51,7 +51,7 @@ public class TweenVec : Tween
                     Target.position = Origin;
                 }
 
-                FinishBackward();
+                BackwardFinish();
             }
         }
     }
@@ -100,7 +100,7 @@ public class TweenVec : Tween
                     Target.position = Destination;
                 }
 
-                FinishForward();
+                ForwardFinish();
             }
         }
     }
@@ -141,7 +141,7 @@ public class TweenVec : Tween
         
         if (InBackward)
         {
-            Timer = ManaAnim.GetTimerVec3(Target.position, Duration, Origin, Delta, Curve);
+            Timer = ManaAnim.GetTimerVec(Target.position, Duration, Origin, Delta, Curve);
         }
     }
 
@@ -151,7 +151,7 @@ public class TweenVec : Tween
 
         if (InForward)
         {
-            Timer = ManaAnim.GetTimerVec3(Target.position, Duration, Destination, -Delta, Curve);
+            Timer = ManaAnim.GetTimerVec(Target.position, Duration, Destination, -Delta, Curve);
         }
     }
 
@@ -162,10 +162,6 @@ public class TweenVec : Tween
 
         if (Timer > Duration)
         {
-            FinishForward();
-
-            Timer = 0;
-
             InForward = false;
             InDestination = true;
 
@@ -197,10 +193,6 @@ public class TweenVec : Tween
 
         if (Timer > Duration)
         {
-            FinishBackward();
-
-            Timer = 0;
-
             InBackward = false;
             InOrigin = true;
 

+ 62 - 2
Assets/Script/Tool/Auxiliary.cs

@@ -16,6 +16,11 @@ using System.ComponentModel;
 using System.Net;
 using System.Security.Cryptography;
 using System.Runtime.Serialization.Formatters.Binary;
+
+using System.Security;
+using System.Security.Cryptography.Xml;
+
+using System.Xml;
 using UnityEngine.Advertisements;
 using Random = UnityEngine.Random;
 using Transform = UnityEngine.Transform;
@@ -72,8 +77,8 @@ public class Auxiliary : Regist
             if (_Des == null)
             {
                 _Des = new DESCryptoServiceProvider();
-                _Des.IV = Encoding.UTF8.GetBytes("12345678");
-                _Des.Key = Encoding.UTF8.GetBytes("12345678");
+                _Des.IV = Encoding.UTF8.GetBytes("19283740");
+                _Des.Key = Encoding.UTF8.GetBytes("93287123");
             }
 
             return _Des;
@@ -109,6 +114,26 @@ public class Auxiliary : Regist
     {
         #region 调试
 
+        if (Input.GetKeyDown(KeyCode.Z))
+        {
+            
+        }
+
+        if (Input.GetKeyDown(KeyCode.X))
+        {
+            
+        }
+
+        if (Input.GetKeyDown(KeyCode.C))
+        {
+            
+        }
+
+        if (Input.GetKeyDown(KeyCode.V))
+        {
+            
+        }
+
         //if (Input.GetKeyDown(KeyCode.P))
         //{
         //    ManaData.Level += 20;
@@ -198,6 +223,41 @@ public class Auxiliary : Regist
     }
 
 
+    public static void EncryptXml(XmlDocument doc)
+    {
+        EncryptedXml encryptedXml = new EncryptedXml();
+
+        XmlElement xmlElement = doc.DocumentElement;
+
+        byte[] bytes = encryptedXml.EncryptData(xmlElement, Des, false);
+
+        EncryptedData encryptedData = new EncryptedData();
+
+        encryptedData.Type = EncryptedXml.XmlEncElementUrl;
+
+        encryptedData.EncryptionMethod = new EncryptionMethod(EncryptedXml.XmlEncDESUrl);
+
+        encryptedData.CipherData.CipherValue = bytes;
+
+        EncryptedXml.ReplaceElement(xmlElement, encryptedData, false);
+    }
+
+    public static void DecryptXml(XmlDocument doc)
+    {
+        EncryptedXml encryptedXml = new EncryptedXml();
+
+        XmlElement encryptXmlElement = (XmlElement)doc.GetElementsByTagName("EncryptedData")[0];
+
+        EncryptedData encryptedData = new EncryptedData();
+
+        encryptedData.LoadXml(encryptXmlElement);
+
+        byte[] bytes = encryptedXml.DecryptData(encryptedData, Des);
+
+        encryptedXml.ReplaceData(encryptXmlElement, bytes);
+    }
+
+
     public static byte[] Encrypt(string str)
     {
         byte[] bytes = Encoding.UTF8.GetBytes(str);

+ 8 - 8
Assets/Script/Tool/Bundle.cs

@@ -15,7 +15,7 @@ public class Bundle : MonoBehaviour
 
     public static Bundle Instance;
 
-    public static bool LoadComplete;
+    public static bool Complete;
 
     public static AssetBundle Atlas;
 
@@ -25,8 +25,6 @@ public class Bundle : MonoBehaviour
     private static AssetBundle Scene;
     private static AssetBundle Config;
 
-    public bool DebugMode;
-
     public List<Object> UiList;
     public List<Object> AtlasList;
     public List<Object> EffectList;
@@ -42,14 +40,14 @@ public class Bundle : MonoBehaviour
 
         LoadAll
         (
-            () => LoadComplete = true
+            () => Complete = true
         );
     }
 
 
     public static T Load<T>(string goName, Folder folder) where T : Object
     {
-        if (Instance.DebugMode)
+        if (Initializer.Instance.DebugMode)
         {
             #region MyRegion
 
@@ -215,9 +213,11 @@ public class Bundle : MonoBehaviour
     {
         yield return LoadConfig();
 
+        ManaReso.AddAsyncLoad("PlayerConfig", Folder.Config, () => { Data.PlayerDoc = Data.PlayerDoc; });
+
         yield return LoadUI();
 
-        if (!Logo.LogoComplete && !Instance.DebugMode)
+        if (!Logo.Complete && !Initializer.Instance.DebugMode)
         {
             ManaReso.AddAsyncLoad("Canvas",1,Folder.UI,ObjType.Canvas);
 
@@ -237,7 +237,7 @@ public class Bundle : MonoBehaviour
 
         yield return LoadScene();
 
-        if (!Logo.LogoComplete && !Instance.DebugMode)
+        if (!Logo.Complete && !Initializer.Instance.DebugMode)
         {
             //if (Data.GetPlayerBool("TutorialA") && Data.GetPlayerInt("TutorialIndexA") == 1)
             //{
@@ -258,7 +258,7 @@ public class Bundle : MonoBehaviour
 
         yield return LoadAudio();
 
-        if (!Logo.LogoComplete && !Instance.DebugMode)
+        if (!Logo.Complete && !Initializer.Instance.DebugMode)
         {
             ManaReso.AddAsyncLoad("Music", 1, Folder.Audio, ObjType.Music);
 

+ 9 - 9
Assets/Script/Tool/DashGame/Language.cs

@@ -42,9 +42,9 @@ public class Language
             ManaReso.Get<Button>("L_SimChi").interactable = true;
             ManaReso.Get<Button>("L_English").interactable = false;
 
-            ManaReso.Get<Button>("L_TraChi").image.color = ManaColor.LightGray;
-            ManaReso.Get<Button>("L_SimChi").image.color = ManaColor.LightGray;
-            ManaReso.Get<Button>("L_English").image.color = ManaColor.Orange;
+            ManaReso.Get<Button>("L_TraChi").image.color = Shortcut.LightGray;
+            ManaReso.Get<Button>("L_SimChi").image.color = Shortcut.LightGray;
+            ManaReso.Get<Button>("L_English").image.color = Shortcut.Orange;
         }
         else if (ManaLan.CurrentLan == Lan.ChineseSimplified)
         {
@@ -52,9 +52,9 @@ public class Language
             ManaReso.Get<Button>("L_SimChi").interactable = false;
             ManaReso.Get<Button>("L_English").interactable = true;
 
-            ManaReso.Get<Button>("L_TraChi").image.color = ManaColor.LightGray;
-            ManaReso.Get<Button>("L_SimChi").image.color = ManaColor.Orange;
-            ManaReso.Get<Button>("L_English").image.color = ManaColor.LightGray;
+            ManaReso.Get<Button>("L_TraChi").image.color = Shortcut.LightGray;
+            ManaReso.Get<Button>("L_SimChi").image.color = Shortcut.Orange;
+            ManaReso.Get<Button>("L_English").image.color = Shortcut.LightGray;
         }
         else if (ManaLan.CurrentLan == Lan.ChineseTraditional)
         {
@@ -62,9 +62,9 @@ public class Language
             ManaReso.Get<Button>("L_SimChi").interactable = true;
             ManaReso.Get<Button>("L_English").interactable = true;
 
-            ManaReso.Get<Button>("L_TraChi").image.color = ManaColor.Orange;
-            ManaReso.Get<Button>("L_SimChi").image.color = ManaColor.LightGray;
-            ManaReso.Get<Button>("L_English").image.color = ManaColor.LightGray;
+            ManaReso.Get<Button>("L_TraChi").image.color = Shortcut.Orange;
+            ManaReso.Get<Button>("L_SimChi").image.color = Shortcut.LightGray;
+            ManaReso.Get<Button>("L_English").image.color = Shortcut.LightGray;
         }
     }
 

+ 4 - 4
Assets/Script/Tool/DashGame/Logo.cs

@@ -8,7 +8,7 @@ public class Logo : MonoBehaviour
 {
     #region 变量
 
-    public static bool LogoComplete;
+    public static bool Complete;
 
     public static GameObject Camera;
 
@@ -21,12 +21,12 @@ public class Logo : MonoBehaviour
 
     public void Begin()
     {
-        LogoComplete = false;
+        Complete = false;
     }
 
-    public void Complete()
+    public void Finish()
     {
-        LogoComplete = true;
+        Complete = true;
 
         Camera.SetActive(false);
 

+ 83 - 36
Assets/Script/Tool/Data.cs

@@ -1,4 +1,6 @@
-using UnityEngine;
+using LitJson;
+
+using UnityEngine;
 
 using System;
 using System.IO;
@@ -6,6 +8,7 @@ using System.Xml;
 using System.Text;
 using System.Collections;
 using System.Collections.Generic;
+using System.Security.Cryptography;
 
 public class Data
 {
@@ -15,24 +18,24 @@ public class Data
     {
         get
         {
-            if (_PlayerNode == null)
+            if (PlayerNode_ == null)
             {
-                _PlayerNode = PlayerDoc.SelectSingleNode("PlayerConfig");
+                PlayerNode_ = PlayerDoc.SelectSingleNode("PlayerConfig");
             }
 
-            return _PlayerNode;
+            return PlayerNode_;
         }
-        set { _PlayerNode = value; }
+        set { PlayerNode_ = value; }
     }
     public static XmlDocument PlayerDoc
     {
         get
         {
-            if (_PlayerDoc == null)
+            if (PlayerDoc_ == null)
             {
                 int version = 0;
                 int nativeVersion = 0;
-                XmlNode temoNode;
+                XmlNode tempNode;
                 XmlDocument tempDoc1;
                 XmlDocument tempDoc2;
 
@@ -55,6 +58,21 @@ public class Data
                     tempDoc1 = new XmlDocument();
                     tempDoc1.LoadXml(sr.ReadToEnd());
 
+                    byte[] bytes = Encoding.UTF8.GetBytes(tempDoc1.OuterXml);
+
+                    MD5 md5 = new MD5CryptoServiceProvider();
+
+                    if (PlayerPrefs.GetString("config") != Encoding.UTF8.GetString(md5.ComputeHash(bytes)))
+                    {
+                        DamageXml = true;
+
+                        ManaServer.Load(PlayerPrefs.GetString("id"), RecoveXml);
+
+                        return null;
+                    }
+
+                    Auxiliary.DecryptXml(tempDoc1);
+
                     sr.Close();
                     
                     TextAsset textAsset = ManaReso.Load<TextAsset>("PlayerConfig", Folder.Config);
@@ -64,9 +82,9 @@ public class Data
                     
                     version = int.Parse(tempDoc2.SelectSingleNode("PlayerConfig").SelectSingleNode("Version").Attributes[0].Value);
 
-                    temoNode = tempDoc1.SelectSingleNode("PlayerConfig").SelectSingleNode("Version");
+                    tempNode = tempDoc1.SelectSingleNode("PlayerConfig").SelectSingleNode("Version");
 
-                    if (temoNode == null)
+                    if (tempNode == null)
                     {
                         StreamWriter sw = new StreamWriter(Application.persistentDataPath + "/PlayerConfig.xml");
 
@@ -74,13 +92,13 @@ public class Data
 
                         sw.Close();
 
-                        _PlayerDoc = tempDoc2;
+                        PlayerDoc_ = tempDoc2;
                     }
                     else
                     {
-                        nativeVersion = int.Parse(temoNode.Attributes[0].Value);
+                        nativeVersion = int.Parse(tempNode.Attributes[0].Value);
 
-                        if (nativeVersion != version)
+                        if (nativeVersion < version)
                         {
                             StreamWriter sw = new StreamWriter(Application.persistentDataPath + "/PlayerConfig.xml");
 
@@ -88,11 +106,11 @@ public class Data
 
                             sw.Close();
 
-                            _PlayerDoc = tempDoc2;
+                            PlayerDoc_ = tempDoc2;
                         }
                         else
                         {
-                            _PlayerDoc = tempDoc1;
+                            PlayerDoc_ = tempDoc1;
                         }
                     }
                 }
@@ -103,37 +121,63 @@ public class Data
                     tempDoc2 = new XmlDocument();
                     tempDoc2.LoadXml(textAsset.text);
 
-                    StreamWriter sw = new StreamWriter(Application.persistentDataPath + "/PlayerConfig.xml");
-
-                    sw.Write(tempDoc2.OuterXml);
-
-                    sw.Close();
-
-                    _PlayerDoc = tempDoc2;
-
-                    _PlayerDoc.SelectSingleNode("PlayerConfig").SelectSingleNode("QuitTime").Attributes[0].Value = DateTime.Now.ToString();
+                    PlayerDoc_ = tempDoc2;
+                    
+                    PlayerDoc_.SelectSingleNode("PlayerConfig").SelectSingleNode("QuitTime").Attributes[0].Value = DateTime.Now.ToString();
                 }
             }
 
-            return _PlayerDoc;
+            return PlayerDoc_;
         }
-        set { _PlayerDoc = value; }
+        set { PlayerDoc_ = value; }
     }
 
-    public static XmlNode _PlayerNode;
-    public static XmlDocument _PlayerDoc;
+    public static XmlNode PlayerNode_;
+    public static XmlDocument PlayerDoc_;
+
+    public static bool DamageXml;
 
     #endregion
 
     public static void SaveXml()
     {
-        if (Initializer.LoadComplete)
+        if (Initializer.Complete)
         {
+            Auxiliary.EncryptXml(PlayerDoc);
+            
             StreamWriter sw = new StreamWriter(Application.persistentDataPath + "/PlayerConfig.xml");
-
+            
             sw.Write(PlayerDoc.OuterXml);
 
             sw.Close();
+
+
+            byte[] bytes = Encoding.UTF8.GetBytes(PlayerDoc.OuterXml);
+
+            MD5 md5 = new MD5CryptoServiceProvider();
+
+            PlayerPrefs.SetString("id", ManaServer.ID);
+            PlayerPrefs.SetString("config", Encoding.UTF8.GetString(md5.ComputeHash(bytes)));
+        }
+    }
+
+    public static void RecoveXml(JsonData jsonData)
+    {
+        DamageXml = false;
+
+        if (jsonData.Inst_Object.Keys.Contains("l"))
+        {
+            PlayerDoc_ = new XmlDocument();
+
+            PlayerDoc_.LoadXml(jsonData["l"].ToString());
+        }
+        else
+        {
+            TextAsset textAsset = ManaReso.Load<TextAsset>("PlayerConfig", Folder.Config);
+
+            PlayerDoc_ = new XmlDocument();
+
+            PlayerDoc_.LoadXml(textAsset.text);
         }
     }
 
@@ -274,7 +318,7 @@ public class Data
 
         foreach (var kv in ManaAchieve.AchieveDic)
         {
-            if (!kv.Value.Available)
+            if (!kv.Value.Valid)
             {
                 xmlNode.Attributes[0].Value += kv.Value.ID_ + " ";
             }
@@ -394,13 +438,16 @@ public class Data
 
     public  static void SavePlayerConfig()
     {
-        ManaVisit.DataReverse();
+        if (Initializer.Complete)
+        {
+            ManaVisit.DataReverse();
 
-        SaveSkillList();
-        SaveAchieve();
-        SavePlantList();
-        SaveCommon();
-        SaveFlowerList();
+            SaveSkillList();
+            SaveAchieve();
+            SavePlantList();
+            SaveCommon();
+            SaveFlowerList();
+        }
     }
 
 

+ 31 - 111
Assets/Script/Tool/Extension.cs

@@ -304,15 +304,6 @@ public static class Extension
 
     #region Alpha
 
-    public static void SetAlpha(this Material material, float alpha, string propertyName)
-    {
-        Color color = material.GetColor(propertyName);
-
-        color.a = alpha;
-
-        material.SetColor(propertyName, color);
-    }
-
     public static void SetAlpha(this Graphic graphic, float alpha)
     {
         graphic.color = new Color(graphic.color.r, graphic.color.g, graphic.color.b, alpha);
@@ -653,108 +644,6 @@ public static class Extension
     }
 
 
-    public static TweenSr TweenConForSr(this Component comp)
-    {
-        return ManaAnim.TweenConForSr(comp.transform);
-    }
-
-    public static TweenCG TweenConForCG(this Component comp)
-    {
-        return ManaAnim.TweenConForCG(comp.transform);
-    }
-
-    public static TweenVec TweenConForVec(this Component comp)
-    {
-        return ManaAnim.TweenConForVec(comp.transform);
-    }
-
-    public static TweenGra TweenConForGra(this Component comp)
-    {
-        return ManaAnim.TweenConForGra(comp.transform);
-    }
-
-    public static TweenFont TweenConForFont(this Component comp)
-    {
-        return ManaAnim.TweenConForFont(comp.transform);
-    }
-
-    public static TweenRect TweenConForRect(this Component comp)
-    {
-        return ManaAnim.TweenConForRect(comp.transform);
-    }
-
-    public static TweenScale TweenConForScale(this Component comp)
-    {
-        return ManaAnim.TweenConForScale(comp.transform);
-    }
-
-    public static TweenAudio TweenConForAudio(this Component comp)
-    {
-        return ManaAnim.TweenConForAudio(comp.transform);
-    }
-
-    public static TweenAudio TweenConForAudio(this AudioSource audioSource)
-    {
-        return ManaAnim.TweenConForAudio(audioSource);
-    }
-
-    public static TweenNumber TweenConForNumber(this Component comp)
-    {
-        return ManaAnim.TweenConForNumber(comp.transform);
-    }
-
-
-    public static TweenSr TweenConBacSr(this Component comp)
-    {
-        return ManaAnim.TweenConBacSr(comp.transform);
-    }
-
-    public static TweenCG TweenConBacCG(this Component comp)
-    {
-        return ManaAnim.TweenConBacCG(comp.transform);
-    }
-
-    public static TweenVec TweenConBacVec(this Component comp)
-    {
-        return ManaAnim.TweenConBacVec(comp.transform);
-    }
-
-    public static TweenGra TweenConBacGra(this Component comp)
-    {
-        return ManaAnim.TweenConBacGra(comp.transform);
-    }
-
-    public static TweenFont TweenConBacFont(this Component comp)
-    {
-        return ManaAnim.TweenConBacFont(comp.transform);
-    }
-
-    public static TweenRect TweenConBacRect(this Component comp)
-    {
-        return ManaAnim.TweenConBacRect(comp.transform);
-    }
-
-    public static TweenScale TweenConBacScale(this Component comp)
-    {
-        return ManaAnim.TweenConBacScale(comp.transform);
-    }
-
-    public static TweenAudio TweenConBacAudio(this Component comp)
-    {
-        return ManaAnim.TweenConBacAudio(comp.transform);
-    }
-
-    public static TweenAudio TweenConBacAudio(this AudioSource audioSource)
-    {
-        return ManaAnim.TweenConBacAudio(audioSource);
-    }
-
-    public static TweenNumber TweenConBacNumber(this Component comp)
-    {
-        return ManaAnim.TweenConBacNumber(comp.transform);
-    }
-
-
     public static TweenSr GetTweenSr(this Component comp)
     {
         return ManaAnim.GetTweenSr(comp.transform);
@@ -917,6 +806,16 @@ public static class Extension
     }
 
 
+    public static TweenScale CreateTweenScale(this Component comp, float origin, float destination, float duration, bool originActive, bool destActive, Curve curve, bool cg = false)
+    {
+        return ManaAnim.CreateTweenScale(comp.transform, origin, destination, duration, originActive, destActive, curve, cg);
+    }
+
+    public static TweenScale CreateTweenScale(this Component comp, float destination, float duration, bool originActive, bool destActive, Curve curve, bool cg = false)
+    {
+        return ManaAnim.CreateTweenScale(comp.transform, destination, duration, originActive, destActive, curve, cg);
+    }
+
     public static TweenScale CreateTweenScale(this Component comp, Vector3 origin, Vector3 destination, float duration, bool originActive, bool destActive, Curve curve, bool cg = false)
     {
         return ManaAnim.CreateTweenScale(comp.transform, origin, destination, duration, originActive, destActive, curve, cg);
@@ -1025,6 +924,27 @@ public static class Extension
 
     #endregion
 
+    #region Material
+
+    public static void SetAlpha(this Material material, float alpha, string propertyName)
+    {
+        Color color = material.GetColor(propertyName);
+
+        color.a = alpha;
+
+        material.SetColor(propertyName, color);
+    }
+
+
+    public static float GetAlpha(this Material material, string propertyName)
+    {
+        Color color = material.GetColor(propertyName);
+
+        return color.a;
+    }
+
+    #endregion
+
     #region GetChild
 
     public static Transform GetChild(this Component comp, int index)

+ 2 - 2
Assets/Script/Tool/SceneMask.cs

@@ -39,7 +39,7 @@ public class SceneMask : Regist
 
         BoxCollider.size = new Vector2(36*radiusX, 20*radiusY);
 
-        ManaReso.Get("TutorialMask").TweenConForSr();
+        ManaReso.Get("TutorialMask").TweenForSr();
     }
 
     public static void ClearArea()
@@ -53,6 +53,6 @@ public class SceneMask : Regist
 
         BoxCollider.size = new Vector2();
 
-        ManaReso.Get("TutorialMask").TweenConBacSr();
+        ManaReso.Get("TutorialMask").TweenBacSr();
     }
 }

+ 7 - 1
Assets/Script/Manage/ManaColor.cs → Assets/Script/Tool/Shortcut.cs

@@ -3,8 +3,14 @@
 using System.Collections;
 using System.Collections.Generic;
 
-public class ManaColor
+public class Shortcut
 {
+
 	public static Color Orange = new Color(233/255f, 63/255f, 20/255f, 1);
 	public static Color LightGray = new Color(165/255f, 192/255f, 200/255f, 1);
+
+    public static Material GrayMat
+    {
+        get { return ManaReso.Load<Material>("GrayMat", Folder.Effect); }
+    }
 }

+ 0 - 0
Assets/Script/Manage/ManaColor.cs.meta → Assets/Script/Tool/Shortcut.cs.meta


+ 2 - 2
Assets/Script/Tool/UI/Bubble.cs

@@ -40,8 +40,8 @@ public class Bubble : Regist
     {
         ManaAudio.PlayClip(Clip.BubbleClip);
 
-        Box.TweenConForScale();
-        Background.TweenConForGra();
+        Box.TweenForScale();
+        Background.TweenForGra();
 
         if (string.IsNullOrEmpty(tit))
         {

+ 136 - 0
Assets/Script/Tool/UI/HudTextPlus.cs

@@ -0,0 +1,136 @@
+using UnityEngine;
+using UnityEngine.UI;
+
+using System.Collections;
+using System.Collections.Generic;
+
+public class HudTextPlus : MonoBehaviour
+{
+    #region 变量
+
+    public Text Text
+    {
+        get
+        {
+            if (Text_ == null)
+            {
+                Text_ = GetComponent<Text>();
+            }
+
+            return Text_;
+        }
+        set { Text_ = value; }
+    }
+    public Outline Outline
+    {
+        get
+        {
+            if (Outline_ == null)
+            {
+                Outline_ = GetComponent<Outline>();
+            }
+
+            return Outline_;
+        }
+        set { Outline_ = value; }
+    }
+
+    public Text Text_;
+    public Outline Outline_;
+
+    public float Speed;
+    public Mode MoveMode;
+    public Vector3 Direction;
+
+    #endregion
+
+    public enum Mode
+    {
+        Position,
+        Direction,
+    }
+
+
+    public void FixedUpdate()
+    {
+        if (MoveMode == Mode.Direction)
+        {
+            transform.position += Direction * Speed * Time.fixedDeltaTime;
+        }
+    }
+
+
+    public void SetTween(float time, Color origin, Color dest)
+    {
+        Tween tween = Text.CreateTweenGra(origin, dest, time, false, false, Curve.EaseOutQuad);
+
+        tween.StartForward();
+
+        tween.OnForwardFinish = () =>
+        {
+            ManaReso.Save(gameObject);
+        };
+    }
+
+    public void SetOutline(Color color, Vector2 size)
+    {
+        Outline.effectColor = color;
+        Outline.effectDistance = size;
+    }
+
+    public void SetDirection(Vector3 direction)
+    {
+        Direction = direction;
+    }
+
+
+    public void Show(string str, int size, float speed)
+    {
+        MoveMode = Mode.Direction;
+
+        Outline.enabled = false;
+
+        Text.text = str;
+        Text.color = Color.white;
+        Text.fontSize = size;
+
+        Speed = speed;
+        Direction = Vector3.up;
+    }
+
+
+    public void Show(string str, int size, float time, Vector3 dest)
+    {
+        MoveMode = Mode.Position;
+
+        Outline.enabled = false;
+
+        Text.text = str;
+        Text.color = Color.white;
+        Text.fontSize = size;
+
+        Direction = Vector3.up;
+
+
+        Tween tween = Text.CreateTweenVec2D(dest, time, false, true, true, Curve.EaseOutQuad);
+
+        tween.StartForward();
+    }
+
+    public void Show(string str, int size, float time, Vector3 origin, Vector3 dest)
+    {
+        MoveMode = Mode.Position;
+
+        Outline.enabled = false;
+
+        Text.text = str;
+        Text.fontSize = size;
+
+        Direction = Vector3.up;
+
+
+        Tween tween = Text.CreateTweenVec2D(origin, dest, time, false, true, true, Curve.EaseOutQuad);
+
+        tween.StartForward();
+    }
+}

+ 12 - 0
Assets/Script/Tool/UI/HudTextPlus.cs.meta

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

+ 11 - 5
Assets/Script/Tool/UI/TextPlus.cs

@@ -186,7 +186,7 @@ public class TextPlus : Text
 
     protected void Initialize()
     {
-        LineHeight = cachedTextGenerator.lines[0].height*0.65f;
+        LineHeight = cachedTextGenerator.lines[0].height;
 
         ImageIndex = new List<int>();
         RemovePos = new List<int>();
@@ -396,7 +396,7 @@ public class TextPlus : Text
 
                 front = imageIndex.Last(i) + 1;
                 
-                if (rear <= front)
+                if (rear < front)
                 {
                     continue;
                 }
@@ -442,9 +442,15 @@ public class TextPlus : Text
 
     protected void CreateImage(ImageInfo imageInfo)
     {
-        float height = LineHeight;
-        float width = (height/imageInfo.SpriteInfo.Height)*imageInfo.SpriteInfo.Width;
-        
+        float height = LineHeight*0.65f;
+
+        if (Application.isMobilePlatform)
+        {
+            height *= 0.5f;
+        }
+
+        float width = (height / imageInfo.SpriteInfo.Height) * imageInfo.SpriteInfo.Width;
+
         bool first = false;
 
         if (imageInfo.Left == 0)

+ 1 - 0
Assets/mcs.rsp

@@ -0,0 +1 @@
+-r:System.Security.dll

+ 8 - 0
Assets/mcs.rsp.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 4e5f14e0b2ce7474e87bb2f8e886298b
+timeCreated: 1495522594
+licenseType: Pro
+DefaultImporter:
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 9 - 5
MyLovelyGarden.csproj

@@ -12,12 +12,14 @@
     <ProjectTypeGuids>{E097FAD1-6243-4DAD-9C02-E9B9EFC3FFC1};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
     <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier>
     <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
-    <TargetFrameworkProfile>Unity Subset v3.5</TargetFrameworkProfile>
-    <CompilerResponseFile></CompilerResponseFile>
+    <TargetFrameworkProfile>Unity Full v3.5</TargetFrameworkProfile>
+    <CompilerResponseFile>
+    </CompilerResponseFile>
     <UnityProjectType>Game:1</UnityProjectType>
     <UnityBuildTarget>StandaloneWindows64:19</UnityBuildTarget>
     <UnityVersion>5.5.0f3</UnityVersion>
-    <RootNamespace></RootNamespace>
+    <RootNamespace>
+    </RootNamespace>
     <LangVersion Condition=" '$(VisualStudioVersion)' != '10.0' ">4</LangVersion>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -43,6 +45,7 @@
   <ItemGroup>
     <Reference Include="mscorlib" />
     <Reference Include="System" />
+    <Reference Include="System.Security" />
     <Reference Include="System.XML" />
     <Reference Include="System.Core" />
     <Reference Include="Boo.Lang" />
@@ -177,7 +180,6 @@
     <Compile Include="Assets\Script\Manage\ManaAchieve.cs" />
     <Compile Include="Assets\Script\Manage\ManaAnim.cs" />
     <Compile Include="Assets\Script\Manage\ManaAudio.cs" />
-    <Compile Include="Assets\Script\Manage\ManaColor.cs" />
     <Compile Include="Assets\Script\Manage\ManaData.cs" />
     <Compile Include="Assets\Script\Manage\ManaDebug.cs" />
     <Compile Include="Assets\Script\Manage\ManaGarden.cs" />
@@ -239,9 +241,11 @@
     <Compile Include="Assets\Script\Tool\Data.cs" />
     <Compile Include="Assets\Script\Tool\Extension.cs" />
     <Compile Include="Assets\Script\Tool\SceneMask.cs" />
+    <Compile Include="Assets\Script\Tool\Shortcut.cs" />
     <Compile Include="Assets\Script\Tool\UI\Bubble.cs" />
     <Compile Include="Assets\Script\Tool\UI\HudTarget.cs" />
     <Compile Include="Assets\Script\Tool\UI\HudText.cs" />
+    <Compile Include="Assets\Script\Tool\UI\HudTextPlus.cs" />
     <Compile Include="Assets\Script\Tool\UI\ImagePlus.cs" />
     <Compile Include="Assets\Script\Tool\UI\LightwallUI.cs" />
     <Compile Include="Assets\Script\Tool\UI\PointsUI.cs" />
@@ -296,4 +300,4 @@
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Target Name="GenerateTargetFrameworkMonikerAttribute" />
-</Project>
+</Project>

BIN
ProjectSettings/ProjectSettings.asset


+ 12 - 26
ToList.txt

@@ -1,45 +1,31 @@
 编存档 下载随机存档失败时就编一个存档
 
-分享图片是否报错
 
-发布前把服务器中的存档清理一次
-
-Anchor Encrypt 带宽优化 Preload(Atlas)
+注册Bug
 
+Reactive的Bug
 
-Hud能往左右上下走,设置自己的颜色 设置Outline的颜色 设置速度
 
-返回时有存蝴蝶、花的Bug
+分享图片报错
 
-加载的时候切换后台会出现Bug
+带宽优化 打包图集
 
-注册Bug(ManaDebug并没有输出信息)
+不同平台图文混排图片的大小
 
 从Hierrarchy视图中检查是否有Bug
 
-红色小蝴蝶和教程B冲突了 自动解锁蜜蜂和蝴蝶会冲突
-
+如果存档被删除了就重新下载一次
 
-动画
-(
-Move的SetActive
+发布前把服务器中的存档清理一次
 
-完善Stream
+红色小蝴蝶和教程B冲突了 自动解锁蜜蜂和蝴蝶会冲突
 
-TweenSr需要改善(alpha相乘的问题)
 
-Loop功能 Return功能
+Hud换装
 
-Move缺少一个DestinationActive
+动画
+(
+完善Stream的Backward与ReForward和Rebackward
 
 Stream进入Delay时也应该有事件
-
-TweenScale和StreamScale增加一个浮点数重载,方便统一Scale 
-
-可以手动设置是否触发事件 
-
-取消掉ConfineTween,每次执行Forward和Backward时都进行一次Timer计算 Forward时Timer递加,Backward时Timer递减,免去了Timer的计算,判断
-InDestination和InOrigin也可以改用Timer,Timer清零的位置需要改变 
-
-Tween的第一帧也需要执行一次
 )