LiuQilin 8 years ago
parent
commit
4f4c4194e9
90 changed files with 1741 additions and 1491 deletions
  1. BIN
      .vs/MyLovelyGarden/v14/.suo
  2. 9 0
      Assets/Extension.meta
  3. BIN
      Assets/Resource/Logo.unity
  4. 2 2
      Assets/Resource/XML/PlayerConfig.xml
  5. BIN
      Assets/Resource/Xlsx/signin_config.xlsx
  6. 9 0
      Assets/Script/Extension.meta
  7. 44 0
      Assets/Script/Extension/Extension.cs
  8. 0 0
      Assets/Script/Extension/Extension.cs.meta
  9. 39 0
      Assets/Script/Extension/ExtensionAlpha.cs
  10. 12 0
      Assets/Script/Extension/ExtensionAlpha.cs.meta
  11. 1 644
      Assets/Script/Extension/ExtensionAnim.cs
  12. 12 0
      Assets/Script/Extension/ExtensionAnim.cs.meta
  13. 18 0
      Assets/Script/Extension/ExtensionBool.cs
  14. 12 0
      Assets/Script/Extension/ExtensionBool.cs.meta
  15. 55 0
      Assets/Script/Extension/ExtensionButton.cs
  16. 12 0
      Assets/Script/Extension/ExtensionButton.cs.meta
  17. 27 0
      Assets/Script/Extension/ExtensionChild.cs
  18. 12 0
      Assets/Script/Extension/ExtensionChild.cs.meta
  19. 21 0
      Assets/Script/Extension/ExtensionCollider.cs
  20. 12 0
      Assets/Script/Extension/ExtensionCollider.cs.meta
  21. 8 0
      Assets/Script/Extension/ExtensionColor.cs
  22. 12 0
      Assets/Script/Extension/ExtensionColor.cs.meta
  23. 22 0
      Assets/Script/Extension/ExtensionComponent.cs
  24. 12 0
      Assets/Script/Extension/ExtensionComponent.cs.meta
  25. 28 0
      Assets/Script/Extension/ExtensionDictionary.cs
  26. 12 0
      Assets/Script/Extension/ExtensionDictionary.cs.meta
  27. 67 0
      Assets/Script/Extension/ExtensionEqual.cs
  28. 12 0
      Assets/Script/Extension/ExtensionEqual.cs.meta
  29. 8 0
      Assets/Script/Extension/ExtensionGameObject.cs
  30. 12 0
      Assets/Script/Extension/ExtensionGameObject.cs.meta
  31. 17 0
      Assets/Script/Extension/ExtensionImage.cs
  32. 12 0
      Assets/Script/Extension/ExtensionImage.cs.meta
  33. 23 0
      Assets/Script/Extension/ExtensionInt.cs
  34. 12 0
      Assets/Script/Extension/ExtensionInt.cs.meta
  35. 76 0
      Assets/Script/Extension/ExtensionList.cs
  36. 12 0
      Assets/Script/Extension/ExtensionList.cs.meta
  37. 8 0
      Assets/Script/Extension/ExtensionMaterial.cs
  38. 12 0
      Assets/Script/Extension/ExtensionMaterial.cs.meta
  39. 100 0
      Assets/Script/Extension/ExtensionScrollRect.cs
  40. 12 0
      Assets/Script/Extension/ExtensionScrollRect.cs.meta
  41. 47 0
      Assets/Script/Extension/ExtensionString.cs
  42. 12 0
      Assets/Script/Extension/ExtensionString.cs.meta
  43. 75 0
      Assets/Script/Extension/ExtensionTransform.cs
  44. 12 0
      Assets/Script/Extension/ExtensionTransform.cs.meta
  45. 23 0
      Assets/Script/Extension/ExtensionUnityAction.cs
  46. 12 0
      Assets/Script/Extension/ExtensionUnityAction.cs.meta
  47. 8 0
      Assets/Script/Extension/ExtensionVector2.cs
  48. 12 0
      Assets/Script/Extension/ExtensionVector2.cs.meta
  49. 8 0
      Assets/Script/Extension/ExtensionVector3.cs
  50. 12 0
      Assets/Script/Extension/ExtensionVector3.cs.meta
  51. 15 0
      Assets/Script/Extension/MyData.cs
  52. 12 0
      Assets/Script/Extension/MyData.cs.meta
  53. 2 2
      Assets/Script/Interface/Regist.cs
  54. 4 4
      Assets/Script/Manage/Initializer.cs
  55. 1 1
      Assets/Script/Manage/ManaAchieve.cs
  56. 6 6
      Assets/Script/Manage/ManaCenter.cs
  57. 8 3
      Assets/Script/Manage/ManaData.cs
  58. 15 7
      Assets/Script/Manage/ManaDebug.cs
  59. 29 29
      Assets/Script/Manage/ManaGarden.cs
  60. 72 68
      Assets/Script/Manage/ManaIAP.cs
  61. 3 3
      Assets/Script/Manage/ManaInfo.cs
  62. 116 131
      Assets/Script/Manage/ManaMiniGame.cs
  63. 8 7
      Assets/Script/Manage/ManaPlayer.cs
  64. 65 157
      Assets/Script/Manage/ManaReso.cs
  65. 20 10
      Assets/Script/Manage/ManaServer.cs
  66. 7 5
      Assets/Script/Manage/ManaSign.cs
  67. 69 69
      Assets/Script/Manage/ManaTutorial.cs
  68. 47 29
      Assets/Script/Manage/ManaUI.cs
  69. 24 23
      Assets/Script/Manage/ManaVisit.cs
  70. 0 14
      Assets/Script/Object/DropDiamond.cs
  71. 0 14
      Assets/Script/Object/DropGold.cs
  72. 0 9
      Assets/Script/Object/Elf.cs
  73. 17 26
      Assets/Script/Object/Flower.cs
  74. 2 11
      Assets/Script/Object/Player.cs
  75. 113 114
      Assets/Script/Object/Skill/Ability.cs
  76. 9 9
      Assets/Script/Object/Skill/BigSkill.cs
  77. 4 4
      Assets/Script/Object/Skill/Pack.cs
  78. 4 4
      Assets/Script/Object/Skill/Skill.cs
  79. 9 7
      Assets/Script/Object/Skill/SkillRoot.cs
  80. 0 9
      Assets/Script/Object/Slot.cs
  81. 20 22
      Assets/Script/Object/Tutorial.cs
  82. 4 4
      Assets/Script/Tool/Anim/TweenSr.cs
  83. 6 9
      Assets/Script/Tool/Auxiliary.cs
  84. 1 1
      Assets/Script/Tool/Bundle.cs
  85. 0 9
      Assets/Script/Tool/SceneMask.cs
  86. 0 9
      Assets/Script/Tool/UI/HudText.cs
  87. 1 1
      Assets/Script/Tool/UI/ImagePlus.cs
  88. 0 9
      Assets/Script/Tool/UI/Toast.cs
  89. 24 1
      MyLovelyGarden.csproj
  90. 9 5
      ToList.txt

BIN
.vs/MyLovelyGarden/v14/.suo


+ 9 - 0
Assets/Extension.meta

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

BIN
Assets/Resource/Logo.unity


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

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

BIN
Assets/Resource/Xlsx/signin_config.xlsx


+ 9 - 0
Assets/Script/Extension.meta

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

+ 44 - 0
Assets/Script/Extension/Extension.cs

@@ -0,0 +1,44 @@
+using UnityEngine;
+using UnityEngine.UI;
+using UnityEngine.Events;
+
+using System;
+using System.Linq;
+using System.Collections;
+using System.Collections.Generic;
+
+using Random = UnityEngine.Random;
+
+public static class Extension
+{
+    #region Regist
+
+    public static T AddScript<T>(this Component comp) where T : Component
+    {
+        return AddScript<T>(comp.gameObject);
+    }
+
+    public static T AddScript<T>(this GameObject go) where T : Component
+    {
+        Component comp = go.AddComponent(typeof(T));
+
+        if (comp is Regist)
+        {
+            Regist regist = (Regist) comp;
+
+            regist.enabled = false;
+
+            regist.RegistImmed();
+
+            Initializer.RegistList.Add(regist);
+
+            return (T) comp;
+        }
+        else
+        {
+            throw new Exception();
+        }
+    }
+
+    #endregion
+}

+ 0 - 0
Assets/Script/Tool/Extension.cs.meta → Assets/Script/Extension/Extension.cs.meta


+ 39 - 0
Assets/Script/Extension/ExtensionAlpha.cs

@@ -0,0 +1,39 @@
+using UnityEngine;
+using UnityEngine.UI;
+
+using System.Collections;
+
+public static class ExtensionAlpha
+{
+    public static void SetAlpha(this Graphic graphic, float alpha)
+    {
+        graphic.color = new Color(graphic.color.r, graphic.color.g, graphic.color.b, alpha);
+    }
+
+    public static void SetAlpha(this Material material, string propertyName, float alpha)
+    {
+        Color color = material.GetColor(propertyName);
+
+        color.a = alpha;
+
+        material.SetColor(propertyName, color);
+    }
+
+    public static void SetAlpha(this TextMesh textMesh, float alpha)
+    {
+        textMesh.color = new Color(textMesh.color.r, textMesh.color.g, textMesh.color.b, alpha);
+    }
+
+    public static void SetAlpha(this SpriteRenderer sR, float alpha)
+    {
+        sR.color = new Color(sR.color.r, sR.color.g, sR.color.b, alpha);
+    }
+
+
+    public static float GetAlpha(this Material material, string propertyName)
+    {
+        Color color = material.GetColor(propertyName);
+
+        return color.a;
+    }
+}

+ 12 - 0
Assets/Script/Extension/ExtensionAlpha.cs.meta

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

+ 1 - 644
Assets/Script/Tool/Extension.cs → Assets/Script/Extension/ExtensionAnim.cs

@@ -1,266 +1,11 @@
 using UnityEngine;
-using UnityEngine.UI;
 using UnityEngine.Events;
 
-using System;
-using System.Linq;
 using System.Collections;
 using System.Collections.Generic;
 
-using Random = UnityEngine.Random;
-
-public enum LocatePos
+public static class ExtensionAnim
 {
-    Left,
-    Right,
-    Center,
-
-    Up,
-    Down,
-    Middle,
-}
-
-public static class Extension
-{
-    #region Int
-
-    public static bool ToBool(this int integer)
-    {
-        if (integer == 0)
-        {
-            return false;
-        }
-        else if (integer == 1)
-        {
-            return true;
-        }
-        else
-        {
-            throw new Exception();
-        }
-    }
-
-    #endregion
-
-    #region Bool
-
-    public static int ToInt(this bool boolean)
-    {
-        if (boolean)
-        {
-            return 1;
-        }
-        else
-        {
-            return 0;
-        }
-    }
-
-    #endregion
-
-
-    #region List
-
-    public static T Last<T>(this List<T> list, int index)
-    {
-        return list[list.Count - 1 - index];
-    }
-
-    public static T Prev<T>(this List<T> list, int index)
-    {
-        return list[(index + list.Count - 1)%list.Count];
-    }
-
-    public static T Next<T>(this List<T> list, int index)
-    {
-        return list[(index + 1)%list.Count];
-    }
-
-    public static T Random<T>(this List<T> list, bool remove = false)
-    {
-        if (list.Count == 0)
-        {
-            Debug.Log("Count is 0");
-        }
-
-        int index = UnityEngine.Random.Range(0, list.Count);
-
-        if (remove)
-        {
-            T result = list[index];
-
-            list.RemoveAt(index);
-
-            return result;
-        }
-        else
-        {
-            return list[index];
-        }
-    }
-
-    public static bool Valid<T>(this List<T> list)
-    {
-        if (list == null || list.Count == 0)
-        {
-            return false;
-        }
-        else
-        {
-            return true;
-        }
-    }
-
-    public static bool UniqueAdd<T>(this List<T> list, T obj)
-    {
-        if (list.Contains(obj) == false)
-        {
-            list.Add(obj);
-
-            return true;
-        }
-        else
-        {
-            return false;
-        }
-    }
-
-    public static void LastRemoveAt<T>(this List<T> list, int index)
-    {
-        list.RemoveAt(list.Count - 1 - index);
-    }
-
-    #endregion
-
-    #region UGUI
-
-    public static void Resize(this Image image, float ratioX, float ratioY)
-    {
-        Vector2 newSize = image.sprite.rect.size;
-
-        newSize.x *= ratioX;
-        newSize.y *= ratioY;
-
-        image.rectTransform.sizeDelta = newSize;
-    }
-
-    #endregion
-
-    #region Event
-
-    public static void SetButtonEvent(this Button button, UnityAction onClick)
-    {
-        button.onClick = new Button.ButtonClickedEvent();
-
-        button.onClick.AddListener(onClick);
-    }
-
-    public static void AddButtonEvent(this Button button, UnityAction onClick)
-    {
-        button.onClick.AddListener(onClick);
-    }
-
-    public static void PushButtonEvent(this Button button, UnityAction onClick)
-    {
-        Button.ButtonClickedEvent click = button.onClick;
-
-        button.onClick = new Button.ButtonClickedEvent();
-
-        button.onClick.AddListener(onClick);
-        button.onClick.AddListener(click.Invoke);
-    }
-
-    public static void AddButtonEventOnetime(this Button button, UnityAction onClick)
-    {
-        onClick += () =>
-        {
-            button.onClick.RemoveListener(onClick);
-        };
-
-        button.onClick.AddListener(onClick);
-    }
-
-    public static void PushButtonEventOnetime(this Button button, UnityAction onClick)
-    {
-        onClick += () =>
-        {
-            button.onClick.RemoveListener(onClick);
-        };
-
-        Button.ButtonClickedEvent click = button.onClick;
-
-        button.onClick = new Button.ButtonClickedEvent();
-
-        button.onClick.AddListener(onClick);
-        button.onClick.AddListener(click.Invoke);
-    }
-
-    #endregion
-
-    #region Equal
-
-    public static bool Equal(this int i1, int i2, int accuracy = 0)
-    {
-        if (Math.Abs(i1 - i2) < accuracy)
-        {
-            return true;
-        }
-        else
-        {
-            return false;
-        }
-    }
-
-    public static bool Equal(this float f1, float f2, float accuracy = 0.0005f)
-    {
-        if (Math.Abs(f1 - f2) < accuracy)
-        {
-            return true;
-        }
-        else
-        {
-            return false;
-        }
-    }
-
-    public static bool Equal(this Color c1, Color c2, float accuracy = 0.0005f)
-    {
-        if (Math.Abs(c1.r - c2.r) < accuracy && Math.Abs(c1.g - c2.g) < accuracy && Math.Abs(c1.b - c2.b) < accuracy && Math.Abs(c1.a - c2.a) < accuracy)
-        {
-            return true;
-        }
-        else
-        {
-            return false;
-        }
-    }
-
-    public static bool Equal(this Vector2 v1, Vector2 v2, float accuracy = 0.0005f)
-    {
-        if (Math.Abs(v1.x - v2.x) < accuracy && Math.Abs(v1.y - v2.y) < accuracy)
-        {
-            return true;
-        }
-        else
-        {
-            return false;
-        }
-    }
-
-    public static bool Equal(this Vector3 v1, Vector3 v2, float accuracy = 0.0005f)
-    {
-        if (Math.Abs(v1.x - v2.x) < accuracy && Math.Abs(v1.y - v2.y) < accuracy && Math.Abs(v1.z - v2.z) < accuracy)
-        {
-            return true;
-        }
-        else
-        {
-            return false;
-        }
-    }
-
-    #endregion
-
     #region Move
 
     public static Shake Shake(this Component comp, float duration, int repeat, Vector3 strength, Curve curve)
@@ -344,122 +89,6 @@ public static class Extension
 
     #endregion
 
-    #region Alpha
-
-    public static void SetAlpha(this Graphic graphic, float alpha)
-    {
-        graphic.color = new Color(graphic.color.r, graphic.color.g, graphic.color.b, alpha);
-    }
-
-    public static void SetAlpha(this TextMesh textMesh, float alpha)
-    {
-        textMesh.color = new Color(textMesh.color.r, textMesh.color.g, textMesh.color.b, alpha);
-    }
-
-    public static void SetAlpha(this SpriteRenderer sR, float alpha)
-    {
-        sR.color = new Color(sR.color.r, sR.color.g, sR.color.b, alpha);
-    }
-
-    #endregion
-
-    #region String
-
-    public static T ToEnum<T>(this string str)
-    {
-        return (T)Enum.Parse(typeof(T), str);
-    }
-
-    #endregion
-
-    #region Sprite
-
-    public static Sprite GetSprite(this Component comp)
-    {
-        return comp.GetComponent<Image>().sprite;
-    }
-
-    #endregion
-
-    #region String
-
-    public static string Remove(this string str, int startIndex, int endIndex, bool empty)
-    {
-        if (startIndex > endIndex)
-        {
-            throw new Exception();
-        }
-
-        return str.Remove(startIndex, endIndex - startIndex + 1);
-    }
-
-    public static string Replace(this string str, int startIndex, int endIndex, string newStr)
-    {
-        str = str.Remove(startIndex, endIndex - startIndex + 1);
-
-        str = str.Insert(startIndex, newStr);
-
-        return str;
-    }
-
-    public static string Between(this string str, int startIndex, int endIndex)
-    {
-        if (startIndex > endIndex)
-        {
-            return "";
-        }
-        else if (startIndex == endIndex)
-        {
-            return str[startIndex].ToString();
-        }
-        else
-        {
-            return str.Substring(startIndex, endIndex - startIndex + 1);
-        }
-    }
-
-    #endregion
-
-    #region Regist
-
-    public static T AddScript<T>(this Component comp) where T : Component
-    {
-        return AddScript<T>(comp.gameObject);
-    }
-
-    public static T AddScript<T>(this GameObject go) where T : Component
-    {
-        Component comp = go.AddComponent(typeof(T));
-
-        if (comp is Regist)
-        {
-            Regist regist = (Regist) comp;
-
-            regist.enabled = false;
-
-            regist.RegistImmed();
-
-            Initializer.RegistList.Add(regist);
-
-            return (T) comp;
-        }
-        else
-        {
-            throw new Exception();
-        }
-    }
-
-    #endregion
-
-    #region Active
-
-    public static void SetActive(this Component comp, bool active)
-    {
-        comp.gameObject.SetActive(active);
-    }
-
-    #endregion
-
     #region Tween
 
     public static TweenSr TweenForSr(this Component comp)
@@ -963,276 +592,4 @@ public static class Extension
     }
 
     #endregion
-
-    #region Collider
-
-    public static void SetCollider(this Component comp, bool active)
-    {
-        BoxCollider2D collider = comp.GetComponent<BoxCollider2D>();
-
-        if (collider)
-        {
-            collider.enabled = active;
-        }
-    }
-
-    public static void SetCollider(this GameObject gameObject, bool active)
-    {
-        gameObject.GetComponent<BoxCollider2D>().enabled = active;
-    }
-
-    #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)
-    {
-        return comp.transform.GetChild(index);
-    }
-
-    public static Transform GetChild(this GameObject gameObject, int index)
-    {
-        return gameObject.transform.GetChild(index);
-    }
-
-    #endregion
-
-    #region SetParent
-
-    public static void SetParent(this Component comp, Transform par)
-    {
-        comp.transform.SetParent(par);
-    }
-
-    public static void SetParent(this GameObject go, Transform par)
-    {
-        go.transform.SetParent(par);
-    }
-
-    #endregion
-
-    #region ScrollRect
-
-    public static MoveRoot Locate(this ScrollRect scrollRect, int index, float duration, Curve curve, LocatePos locatePos)
-    {
-        LayoutGroup layoutGroup = scrollRect.content.GetComponent<LayoutGroup>();
-
-        RectTransform tra1 = scrollRect.GetComponent<RectTransform>();
-
-        Rect rect1 = tra1.rect;
-
-        RectTransform tra2 = scrollRect.content.GetChild(index).GetComponent<RectTransform>();
-
-        Rect rect2 = tra2.rect;
-
-        if (locatePos == LocatePos.Up)
-        {
-            Vector3 itemPos = tra2.position + new Vector3(0, rect2.yMax, 0);
-            Vector3 targetPos = tra1.position + new Vector3(0, rect1.yMax - layoutGroup.padding.top, 0);
-
-            Vector3 offset = targetPos - itemPos;
-            offset.x = 0;
-
-            return scrollRect.content.MoveOffset2D(offset, duration, false, curve);
-        }
-        if (locatePos == LocatePos.Down)
-        {
-            Vector3 itemPos = tra2.position + new Vector3(0, rect2.yMin, 0);
-            Vector3 targetPos = tra1.position + new Vector3(0, rect1.yMin + layoutGroup.padding.bottom, 0);
-
-            Vector3 offset = targetPos - itemPos;
-            offset.x = 0;
-
-            return scrollRect.content.MoveOffset2D(offset, duration, false, curve);
-        }
-        else if (locatePos == LocatePos.Middle)
-        {
-            Vector3 itemPos = tra2.position + new Vector3(rect2.center.x, rect2.center.y, 0);
-            Vector3 targetPos = tra1.position + new Vector3(rect1.center.x, rect1.center.y, 0);
-
-            Vector3 offset = targetPos - itemPos;
-            offset.x = 0;
-
-            return scrollRect.content.MoveOffset2D(offset, duration, false, curve);
-        }
-        if (locatePos == LocatePos.Left)
-        {
-            Vector3 itemPos = tra2.position + new Vector3(rect2.xMin, 0, 0);
-            Vector3 targetPos = tra1.position + new Vector3(rect1.xMin + layoutGroup.padding.left, 0, 0);
-
-            Vector3 offset = targetPos - itemPos;
-            offset.y = 0;
-
-            return scrollRect.content.MoveOffset2D(offset, duration, false, curve);
-        }
-        if (locatePos == LocatePos.Right)
-        {
-            Vector3 itemPos = tra2.position + new Vector3(rect2.xMax, 0, 0);
-            Vector3 targetPos = tra1.position + new Vector3(rect1.xMax - layoutGroup.padding.right, 0, 0);
-
-            Vector3 offset = targetPos - itemPos;
-            offset.y = 0;
-
-            return scrollRect.content.MoveOffset2D(offset, duration, false, curve);
-        }
-        if (locatePos == LocatePos.Center)
-        {
-            Vector3 itemPos = tra2.position + new Vector3(rect2.center.x, rect2.center.y, 0);
-            Vector3 targetPos = tra1.position + new Vector3(rect1.center.x, rect1.center.y, 0);
-
-            Vector3 offset = targetPos - itemPos;
-            offset.y = 0;
-
-            return scrollRect.content.MoveOffset2D(offset, duration, false, curve);
-        }
-
-        throw new Exception();
-    }
-
-    public static MoveRoot Locate(this ScrollRect scrollRect, Transform item, float duration, Curve curve, LocatePos locatePos)
-    {
-        return scrollRect.Locate(item.GetSiblingIndex(), duration, curve, locatePos);
-    }
-
-    #endregion
-
-    #region Transform
-
-    public static void SetX(this Transform tra, float x)
-    {
-        tra.position = new Vector3(x, tra.position.y, tra.position.z);
-    }
-
-    public static void SetY(this Transform tra, float y)
-    {
-        tra.position = new Vector3(tra.position.x, y, tra.position.z);
-    }
-
-    public static void SetZ(this Transform tra, float z)
-    {
-        tra.position = new Vector3(tra.position.x, tra.position.y, z);
-    }
-
-    public static void SetLX(this Transform tra, float x)
-    {
-        tra.localPosition = new Vector3(x, tra.localPosition.y, tra.localPosition.z);
-    }
-
-    public static void SetLY(this Transform tra, float y)
-    {
-        tra.localPosition = new Vector3(tra.localPosition.x, y, tra.localPosition.z);
-    }
-
-    public static void SetLZ(this Transform tra, float z)
-    {
-        tra.localPosition = new Vector3(tra.localPosition.x, tra.localPosition.y, z);
-    }
-
-    public static void SetEX(this Transform tra, float x)
-    {
-        tra.eulerAngles = new Vector3(x, tra.eulerAngles.y, tra.eulerAngles.z);
-    }
-
-    public static void SetEY(this Transform tra, float y)
-    {
-        tra.eulerAngles = new Vector3(tra.eulerAngles.x, y, tra.eulerAngles.z);
-    }
-
-    public static void SetEZ(this Transform tra, float z)
-    {
-        tra.eulerAngles = new Vector3(tra.eulerAngles.x, tra.eulerAngles.y, z);
-    }
-
-    public static Vector3 GetScale(this Transform tra)
-    {
-        Vector3 scale = tra.localScale;
-
-        while (tra.parent != null)
-        {
-            float x = scale.x * tra.parent.localScale.x;
-            float y = scale.y * tra.parent.localScale.y;
-            float z = scale.z * tra.parent.localScale.z;
-
-            scale = new Vector3(x, y, z);
-
-            tra = tra.parent;
-        }
-
-        return scale;
-    }
-
-    #endregion
-
-    #region Dictionary
-
-    public static T2 Random<T1, T2>(this Dictionary<T1, T2> dic)
-    {
-        return dic.Values.ToList().Random();
-    }
-
-    public static bool UniqueAdd<T1, T2>(this Dictionary<T1, T2> dic, T1 t1, T2 t2)
-    {
-        if (dic.ContainsKey(t1))
-        {
-            return false;
-        }
-        else
-        {
-            dic.Add(t1, t2);
-
-            return true;
-        }
-    }
-
-    #endregion
-
-    #region UnityAction
-
-    public static void SafeInvoke(this UnityAction action)
-    {
-        if (action != null)
-        {
-            action.Invoke();
-        }
-    }
-
-    public static void SafeInvoke<T>(this UnityAction<T> action, T t)
-    {
-        if (action != null)
-        {
-            action.Invoke(t);
-        }
-    }
-
-    #endregion
-
-    #region AddComponent
-
-    public static T AddComponent<T>(this Component comp) where T : Component
-    {
-        return comp.transform.gameObject.AddComponent<T>();
-    }
-
-    #endregion
 }

+ 12 - 0
Assets/Script/Extension/ExtensionAnim.cs.meta

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

+ 18 - 0
Assets/Script/Extension/ExtensionBool.cs

@@ -0,0 +1,18 @@
+using UnityEngine;
+
+using System.Collections;
+
+public static class ExtensionBool
+{
+    public static int ToInt(this bool boolean)
+    {
+        if (boolean)
+        {
+            return 1;
+        }
+        else
+        {
+            return 0;
+        }
+    }
+}

+ 12 - 0
Assets/Script/Extension/ExtensionBool.cs.meta

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

+ 55 - 0
Assets/Script/Extension/ExtensionButton.cs

@@ -0,0 +1,55 @@
+using UnityEngine;
+using UnityEngine.UI;
+using UnityEngine.Events;
+
+using System.Collections;
+
+public static class ExtensionButton
+{
+    public static void SetButtonEvent(this Button button, UnityAction onClick)
+    {
+        button.onClick = new Button.ButtonClickedEvent();
+
+        button.onClick.AddListener(onClick);
+    }
+
+    public static void AddButtonEvent(this Button button, UnityAction onClick)
+    {
+        button.onClick.AddListener(onClick);
+    }
+
+    public static void PushButtonEvent(this Button button, UnityAction onClick)
+    {
+        Button.ButtonClickedEvent click = button.onClick;
+
+        button.onClick = new Button.ButtonClickedEvent();
+
+        button.onClick.AddListener(onClick);
+        button.onClick.AddListener(click.Invoke);
+    }
+
+    public static void AddButtonEventOnetime(this Button button, UnityAction onClick)
+    {
+        onClick += () =>
+        {
+            button.onClick.RemoveListener(onClick);
+        };
+
+        button.onClick.AddListener(onClick);
+    }
+
+    public static void PushButtonEventOnetime(this Button button, UnityAction onClick)
+    {
+        onClick += () =>
+        {
+            button.onClick.RemoveListener(onClick);
+        };
+
+        Button.ButtonClickedEvent click = button.onClick;
+
+        button.onClick = new Button.ButtonClickedEvent();
+
+        button.onClick.AddListener(onClick);
+        button.onClick.AddListener(click.Invoke);
+    }
+}

+ 12 - 0
Assets/Script/Extension/ExtensionButton.cs.meta

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

+ 27 - 0
Assets/Script/Extension/ExtensionChild.cs

@@ -0,0 +1,27 @@
+using UnityEngine;
+
+using System.Collections;
+
+public static class ExtensionFamily
+{
+    public static Transform GetChild(this Component comp, int index)
+    {
+        return comp.transform.GetChild(index);
+    }
+
+    public static Transform GetChild(this GameObject gameObject, int index)
+    {
+        return gameObject.transform.GetChild(index);
+    }
+
+
+    public static void SetParent(this Component comp, Transform par)
+    {
+        comp.transform.SetParent(par);
+    }
+
+    public static void SetParent(this GameObject go, Transform par)
+    {
+        go.transform.SetParent(par);
+    }
+}

+ 12 - 0
Assets/Script/Extension/ExtensionChild.cs.meta

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

+ 21 - 0
Assets/Script/Extension/ExtensionCollider.cs

@@ -0,0 +1,21 @@
+using UnityEngine;
+
+using System.Collections;
+
+public static class ExtensionCollider
+{
+    public static void SetCollider(this Component comp, bool active)
+    {
+        BoxCollider2D collider = comp.GetComponent<BoxCollider2D>();
+
+        if (collider)
+        {
+            collider.enabled = active;
+        }
+    }
+
+    public static void SetCollider(this GameObject gameObject, bool active)
+    {
+        gameObject.GetComponent<BoxCollider2D>().enabled = active;
+    }
+}

+ 12 - 0
Assets/Script/Extension/ExtensionCollider.cs.meta

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

+ 8 - 0
Assets/Script/Extension/ExtensionColor.cs

@@ -0,0 +1,8 @@
+using UnityEngine;
+
+using System.Collections;
+
+public static class ExtensionColor
+{
+
+}

+ 12 - 0
Assets/Script/Extension/ExtensionColor.cs.meta

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

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

@@ -0,0 +1,22 @@
+using UnityEngine;
+using UnityEngine.UI;
+
+using System.Collections;
+
+public static class ExtensionComponent
+{
+    public static void SetActive(this Component comp, bool active)
+    {
+        comp.gameObject.SetActive(active);
+    }
+
+    public static Sprite GetSprite(this Component comp)
+    {
+        return comp.GetComponent<Image>().sprite;
+    }
+
+    public static T AddComponent<T>(this Component comp) where T : Component
+    {
+        return comp.transform.gameObject.AddComponent<T>();
+    }
+}

+ 12 - 0
Assets/Script/Extension/ExtensionComponent.cs.meta

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

+ 28 - 0
Assets/Script/Extension/ExtensionDictionary.cs

@@ -0,0 +1,28 @@
+using UnityEngine;
+
+using System.Linq;
+using System.Collections;
+using System.Collections.Generic;
+
+public static class ExtensionDictionary
+{
+
+    public static T2 Random<T1, T2>(this Dictionary<T1, T2> dic)
+    {
+        return dic.Values.ToList().Random();
+    }
+
+    public static bool UniqueAdd<T1, T2>(this Dictionary<T1, T2> dic, T1 t1, T2 t2)
+    {
+        if (dic.ContainsKey(t1))
+        {
+            return false;
+        }
+        else
+        {
+            dic.Add(t1, t2);
+
+            return true;
+        }
+    }
+}

+ 12 - 0
Assets/Script/Extension/ExtensionDictionary.cs.meta

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

+ 67 - 0
Assets/Script/Extension/ExtensionEqual.cs

@@ -0,0 +1,67 @@
+using UnityEngine;
+
+using System;
+using System.Collections;
+
+public static class ExtensionEqua
+{
+    public static bool Equal(this int i1, int i2, int accuracy = 0)
+    {
+        if (Math.Abs(i1 - i2) < accuracy)
+        {
+            return true;
+        }
+        else
+        {
+            return false;
+        }
+    }
+
+    public static bool Equal(this float f1, float f2, float accuracy = 0.0005f)
+    {
+        if (Math.Abs(f1 - f2) < accuracy)
+        {
+            return true;
+        }
+        else
+        {
+            return false;
+        }
+    }
+
+    public static bool Equal(this Color c1, Color c2, float accuracy = 0.0005f)
+    {
+        if (Math.Abs(c1.r - c2.r) < accuracy && Math.Abs(c1.g - c2.g) < accuracy && Math.Abs(c1.b - c2.b) < accuracy && Math.Abs(c1.a - c2.a) < accuracy)
+        {
+            return true;
+        }
+        else
+        {
+            return false;
+        }
+    }
+
+    public static bool Equal(this Vector2 v1, Vector2 v2, float accuracy = 0.0005f)
+    {
+        if (Math.Abs(v1.x - v2.x) < accuracy && Math.Abs(v1.y - v2.y) < accuracy)
+        {
+            return true;
+        }
+        else
+        {
+            return false;
+        }
+    }
+
+    public static bool Equal(this Vector3 v1, Vector3 v2, float accuracy = 0.0005f)
+    {
+        if (Math.Abs(v1.x - v2.x) < accuracy && Math.Abs(v1.y - v2.y) < accuracy && Math.Abs(v1.z - v2.z) < accuracy)
+        {
+            return true;
+        }
+        else
+        {
+            return false;
+        }
+    }
+}

+ 12 - 0
Assets/Script/Extension/ExtensionEqual.cs.meta

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

+ 8 - 0
Assets/Script/Extension/ExtensionGameObject.cs

@@ -0,0 +1,8 @@
+using UnityEngine;
+
+using System.Collections;
+
+public static class ExtensionGameObject
+{
+
+}

+ 12 - 0
Assets/Script/Extension/ExtensionGameObject.cs.meta

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

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

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

+ 12 - 0
Assets/Script/Extension/ExtensionImage.cs.meta

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

+ 23 - 0
Assets/Script/Extension/ExtensionInt.cs

@@ -0,0 +1,23 @@
+using UnityEngine;
+
+using System;
+using System.Collections;
+
+public static class ExtensionInt 
+{
+    public static bool ToBool(this int integer)
+    {
+        if (integer == 0)
+        {
+            return false;
+        }
+        else if (integer == 1)
+        {
+            return true;
+        }
+        else
+        {
+            throw new Exception();
+        }
+    }
+}

+ 12 - 0
Assets/Script/Extension/ExtensionInt.cs.meta

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

+ 76 - 0
Assets/Script/Extension/ExtensionList.cs

@@ -0,0 +1,76 @@
+using UnityEngine;
+
+using System.Collections;
+using System.Collections.Generic;
+
+public static class ExtensionList
+{
+    public static T Last<T>(this List<T> list, int index)
+    {
+        return list[list.Count - 1 - index];
+    }
+
+    public static T Prev<T>(this List<T> list, int index)
+    {
+        return list[(index + list.Count - 1) % list.Count];
+    }
+
+    public static T Next<T>(this List<T> list, int index)
+    {
+        return list[(index + 1) % list.Count];
+    }
+
+    public static T Random<T>(this List<T> list, bool remove = false)
+    {
+        if (list.Count == 0)
+        {
+            Debug.Log("Count is 0");
+        }
+
+        int index = UnityEngine.Random.Range(0, list.Count);
+
+        if (remove)
+        {
+            T result = list[index];
+
+            list.RemoveAt(index);
+
+            return result;
+        }
+        else
+        {
+            return list[index];
+        }
+    }
+
+    public static bool Valid<T>(this List<T> list)
+    {
+        if (list == null || list.Count == 0)
+        {
+            return false;
+        }
+        else
+        {
+            return true;
+        }
+    }
+
+    public static bool UniqueAdd<T>(this List<T> list, T obj)
+    {
+        if (list.Contains(obj) == false)
+        {
+            list.Add(obj);
+
+            return true;
+        }
+        else
+        {
+            return false;
+        }
+    }
+
+    public static void LastRemoveAt<T>(this List<T> list, int index)
+    {
+        list.RemoveAt(list.Count - 1 - index);
+    }
+}

+ 12 - 0
Assets/Script/Extension/ExtensionList.cs.meta

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

+ 8 - 0
Assets/Script/Extension/ExtensionMaterial.cs

@@ -0,0 +1,8 @@
+using UnityEngine;
+
+using System.Collections;
+
+public static class ExtensionMaterial
+{
+
+}

+ 12 - 0
Assets/Script/Extension/ExtensionMaterial.cs.meta

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

+ 100 - 0
Assets/Script/Extension/ExtensionScrollRect.cs

@@ -0,0 +1,100 @@
+using UnityEngine;
+using UnityEngine.UI;
+
+using System;
+using System.Collections;
+
+public enum LocatePos
+{
+    Left,
+    Right,
+    Center,
+
+    Up,
+    Down,
+    Middle,
+}
+
+public static class ExtensionScrollRect
+{
+    public static MoveRoot Locate(this ScrollRect scrollRect, int index, float duration, Curve curve, LocatePos locatePos)
+    {
+        LayoutGroup layoutGroup = scrollRect.content.GetComponent<LayoutGroup>();
+
+        RectTransform tra1 = scrollRect.GetComponent<RectTransform>();
+
+        Rect rect1 = tra1.rect;
+
+        RectTransform tra2 = scrollRect.content.GetChild(index).GetComponent<RectTransform>();
+
+        Rect rect2 = tra2.rect;
+
+        if (locatePos == LocatePos.Up)
+        {
+            Vector3 itemPos = tra2.position + new Vector3(0, rect2.yMax, 0);
+            Vector3 targetPos = tra1.position + new Vector3(0, rect1.yMax - layoutGroup.padding.top, 0);
+
+            Vector3 offset = targetPos - itemPos;
+            offset.x = 0;
+
+            return scrollRect.content.MoveOffset2D(offset, duration, false, curve);
+        }
+        if (locatePos == LocatePos.Down)
+        {
+            Vector3 itemPos = tra2.position + new Vector3(0, rect2.yMin, 0);
+            Vector3 targetPos = tra1.position + new Vector3(0, rect1.yMin + layoutGroup.padding.bottom, 0);
+
+            Vector3 offset = targetPos - itemPos;
+            offset.x = 0;
+
+            return scrollRect.content.MoveOffset2D(offset, duration, false, curve);
+        }
+        else if (locatePos == LocatePos.Middle)
+        {
+            Vector3 itemPos = tra2.position + new Vector3(rect2.center.x, rect2.center.y, 0);
+            Vector3 targetPos = tra1.position + new Vector3(rect1.center.x, rect1.center.y, 0);
+
+            Vector3 offset = targetPos - itemPos;
+            offset.x = 0;
+
+            return scrollRect.content.MoveOffset2D(offset, duration, false, curve);
+        }
+        if (locatePos == LocatePos.Left)
+        {
+            Vector3 itemPos = tra2.position + new Vector3(rect2.xMin, 0, 0);
+            Vector3 targetPos = tra1.position + new Vector3(rect1.xMin + layoutGroup.padding.left, 0, 0);
+
+            Vector3 offset = targetPos - itemPos;
+            offset.y = 0;
+
+            return scrollRect.content.MoveOffset2D(offset, duration, false, curve);
+        }
+        if (locatePos == LocatePos.Right)
+        {
+            Vector3 itemPos = tra2.position + new Vector3(rect2.xMax, 0, 0);
+            Vector3 targetPos = tra1.position + new Vector3(rect1.xMax - layoutGroup.padding.right, 0, 0);
+
+            Vector3 offset = targetPos - itemPos;
+            offset.y = 0;
+
+            return scrollRect.content.MoveOffset2D(offset, duration, false, curve);
+        }
+        if (locatePos == LocatePos.Center)
+        {
+            Vector3 itemPos = tra2.position + new Vector3(rect2.center.x, rect2.center.y, 0);
+            Vector3 targetPos = tra1.position + new Vector3(rect1.center.x, rect1.center.y, 0);
+
+            Vector3 offset = targetPos - itemPos;
+            offset.y = 0;
+
+            return scrollRect.content.MoveOffset2D(offset, duration, false, curve);
+        }
+
+        throw new Exception();
+    }
+
+    public static MoveRoot Locate(this ScrollRect scrollRect, Transform item, float duration, Curve curve, LocatePos locatePos)
+    {
+        return scrollRect.Locate(item.GetSiblingIndex(), duration, curve, locatePos);
+    }
+}

+ 12 - 0
Assets/Script/Extension/ExtensionScrollRect.cs.meta

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

+ 47 - 0
Assets/Script/Extension/ExtensionString.cs

@@ -0,0 +1,47 @@
+using UnityEngine;
+
+using System;
+using System.Collections;
+
+public static class ExtensionString
+{
+    public static T ToEnum<T>(this string str)
+    {
+        return (T)Enum.Parse(typeof(T), str);
+    }
+
+    public static string Remove(this string str, int startIndex, int endIndex, bool empty)
+    {
+        if (startIndex > endIndex)
+        {
+            throw new Exception();
+        }
+
+        return str.Remove(startIndex, endIndex - startIndex + 1);
+    }
+
+    public static string Replace(this string str, int startIndex, int endIndex, string newStr)
+    {
+        str = str.Remove(startIndex, endIndex - startIndex + 1);
+
+        str = str.Insert(startIndex, newStr);
+
+        return str;
+    }
+
+    public static string Between(this string str, int startIndex, int endIndex)
+    {
+        if (startIndex > endIndex)
+        {
+            return "";
+        }
+        else if (startIndex == endIndex)
+        {
+            return str[startIndex].ToString();
+        }
+        else
+        {
+            return str.Substring(startIndex, endIndex - startIndex + 1);
+        }
+    }
+}

+ 12 - 0
Assets/Script/Extension/ExtensionString.cs.meta

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

+ 75 - 0
Assets/Script/Extension/ExtensionTransform.cs

@@ -0,0 +1,75 @@
+using UnityEngine;
+
+using System;
+using System.Collections;
+
+public static class ExtensionTransform 
+{
+    public static void SetX(this Transform tra, float x)
+    {
+        tra.position = new Vector3(x, tra.position.y, tra.position.z);
+    }
+
+    public static void SetY(this Transform tra, float y)
+    {
+        tra.position = new Vector3(tra.position.x, y, tra.position.z);
+    }
+
+    public static void SetZ(this Transform tra, float z)
+    {
+        tra.position = new Vector3(tra.position.x, tra.position.y, z);
+    }
+
+    public static void SetLX(this Transform tra, float x)
+    {
+        tra.localPosition = new Vector3(x, tra.localPosition.y, tra.localPosition.z);
+    }
+
+    public static void SetLY(this Transform tra, float y)
+    {
+        tra.localPosition = new Vector3(tra.localPosition.x, y, tra.localPosition.z);
+    }
+
+    public static void SetLZ(this Transform tra, float z)
+    {
+        tra.localPosition = new Vector3(tra.localPosition.x, tra.localPosition.y, z);
+    }
+
+    public static void SetEX(this Transform tra, float x)
+    {
+        tra.eulerAngles = new Vector3(x, tra.eulerAngles.y, tra.eulerAngles.z);
+    }
+
+    public static void SetEY(this Transform tra, float y)
+    {
+        tra.eulerAngles = new Vector3(tra.eulerAngles.x, y, tra.eulerAngles.z);
+    }
+
+    public static void SetEZ(this Transform tra, float z)
+    {
+        tra.eulerAngles = new Vector3(tra.eulerAngles.x, tra.eulerAngles.y, z);
+    }
+
+    public static Vector3 GetScale(this Transform tra)
+    {
+        Vector3 scale = tra.localScale;
+
+        while (tra.parent != null)
+        {
+            float x = scale.x * tra.parent.localScale.x;
+            float y = scale.y * tra.parent.localScale.y;
+            float z = scale.z * tra.parent.localScale.z;
+
+            scale = new Vector3(x, y, z);
+
+            tra = tra.parent;
+        }
+
+        return scale;
+    }
+
+    public static Component AddComponent(this Transform tra, Type type)
+    {
+        return tra.gameObject.AddComponent(type);
+    }
+}

+ 12 - 0
Assets/Script/Extension/ExtensionTransform.cs.meta

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

+ 23 - 0
Assets/Script/Extension/ExtensionUnityAction.cs

@@ -0,0 +1,23 @@
+using UnityEngine;
+using UnityEngine.Events;
+
+using System.Collections;
+
+public static class ExtensionUnityAction
+{
+    public static void SafeInvoke(this UnityAction action)
+    {
+        if (action != null)
+        {
+            action.Invoke();
+        }
+    }
+
+    public static void SafeInvoke<T>(this UnityAction<T> action, T t)
+    {
+        if (action != null)
+        {
+            action.Invoke(t);
+        }
+    }
+}

+ 12 - 0
Assets/Script/Extension/ExtensionUnityAction.cs.meta

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

+ 8 - 0
Assets/Script/Extension/ExtensionVector2.cs

@@ -0,0 +1,8 @@
+using UnityEngine;
+
+using System.Collections;
+
+public static class ExtensionVector
+{
+
+}

+ 12 - 0
Assets/Script/Extension/ExtensionVector2.cs.meta

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

+ 8 - 0
Assets/Script/Extension/ExtensionVector3.cs

@@ -0,0 +1,8 @@
+using UnityEngine;
+
+using System.Collections;
+
+public static class ExtensionVector3
+{
+
+}

+ 12 - 0
Assets/Script/Extension/ExtensionVector3.cs.meta

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

+ 15 - 0
Assets/Script/Extension/MyData.cs

@@ -0,0 +1,15 @@
+using UnityEngine;
+
+using System.Collections;
+
+public struct KV<T1, T2>
+{
+    public T1 Key;
+    public T2 Value;
+
+    public KV(T1 key, T2 value)
+    {
+        Key = key;
+        Value = value;
+    }
+}

+ 12 - 0
Assets/Script/Extension/MyData.cs.meta

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

+ 2 - 2
Assets/Script/Interface/Regist.cs

@@ -4,9 +4,9 @@ using System.Collections;
 
 public class Regist : MonoBehaviour
 {
-    #region
+    #region 变量
 
-    public bool RegistFlag;
+    
 
     #endregion
 

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

@@ -45,25 +45,25 @@ public class Initializer : MonoBehaviour
         gameObject.AddComponent<ManaIAP>();
 
         gameObject.AddScript<Auxiliary>();
+        gameObject.AddScript<ManaReso>();
+        gameObject.AddScript<ManaTutorial>();
 
         gameObject.AddScript<ManaLan>();
-        gameObject.AddScript<ManaReso>();
         gameObject.AddScript<ManaAnim>();
         gameObject.AddScript<ManaAudio>();
-        gameObject.AddScript<ManaTutorial>();
         gameObject.AddScript<ManaAchieve>();
 
         gameObject.AddScript<ManaUI>();
-        gameObject.AddScript<ManaInfo>();
         gameObject.AddScript<ManaSign>();
         gameObject.AddScript<ManaGarden>();
 
         gameObject.AddScript<ManaCenter>();
         gameObject.AddScript<ManaPlayer>();
         gameObject.AddScript<ManaServer>();
-        gameObject.AddScript<ManaDebug>();
         gameObject.AddScript<ManaMiniGame>();
 
+        gameObject.AddScript<ManaInfo>();
+
         StartCoroutine(IInitialize());
     }
 

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

@@ -56,7 +56,7 @@ public class Achieve
     }
     public Sprite Icon
     {
-        get { return ManaReso.Load<Sprite>(Icon_, Folder.UI); }
+        get { return ManaReso.LoadSprite(Icon_, Folder.UI); }
     }
     public double CurrentValue
     {

+ 6 - 6
Assets/Script/Manage/ManaCenter.cs

@@ -137,7 +137,7 @@ public class ManaCenter : Regist
             {
                 if (ManaTutorial.TutorialC_)
                 {
-                    ManaTutorial.PrepareStepC1();
+                    ManaTutorial.EnterC1();
                 }
                 else
                 {
@@ -768,7 +768,7 @@ public class ManaCenter : Regist
         }
         else if (current == Current.AD)
         {
-            ManaIAP.PlayAd(callback);
+            ManaIAP.PlayAD(callback);
         }
         else if (current == Current.Cash)
         {
@@ -794,7 +794,7 @@ public class ManaCenter : Regist
                     (
                         Language.GetStr("Common", "ShortCoin"),
                         Language.GetStr("Common", "NavigateCoin"),
-                        ManaReso.LoadSprite("金币"),
+                        ManaReso.LoadSprite("金币", Folder.UI),
                         () =>
                         {
                             TweenRoot tween = ManaReso.Get("K_Bubble0").GetTweenScale();
@@ -827,7 +827,7 @@ public class ManaCenter : Regist
                     (
                         Language.GetStr("Common", "ShortCoin"),
                         null,
-                        ManaReso.LoadSprite("金币")
+                        ManaReso.LoadSprite("金币", Folder.UI)
                     );
                 }
             }
@@ -854,7 +854,7 @@ public class ManaCenter : Regist
                     (
                         Language.GetStr("Common", "ShortDiamond"),
                         Language.GetStr("Common", "NavigateDiamond"),
-                        ManaReso.LoadSprite("钻石"),
+                        ManaReso.LoadSprite("钻石", Folder.UI),
                         () =>
                         {
                             TweenRoot tween = ManaReso.Get("K_Bubble0").GetTweenScale();
@@ -887,7 +887,7 @@ public class ManaCenter : Regist
                     (
                         Language.GetStr("Common", "ShortDiamond"),
                         null,
-                        ManaReso.LoadSprite("钻石")
+                        ManaReso.LoadSprite("钻石", Folder.UI)
                     );
                 }
             }

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

@@ -54,20 +54,22 @@ public class ManaData
                 if (File.Exists(configPath))
                 {
                     StreamReader sr = new StreamReader(configPath);
-
+                    
                     nativeDoc.LoadXml(sr.ReadToEnd());
 
                     sr.Close();
 
                     Auxiliary.DecryptXml(nativeDoc);
 
+                    Debug.Log(nativeDoc.OuterXml);
+
                     
                     TextAsset textAsset = ManaReso.Load<TextAsset>("PlayerConfig", Folder.Config);
 
                     bundleDoc.LoadXml(textAsset.text);
                     
                     version = int.Parse(bundleDoc.SelectSingleNode("PlayerConfig").SelectSingleNode("Version").Attributes[0].Value);
-
+                    
                     node = nativeDoc.SelectSingleNode("PlayerConfig").SelectSingleNode("Version");
 
                     if (node == null)
@@ -96,6 +98,8 @@ public class ManaData
                         }
                         else
                         {
+                            Debug.Log(nativeDoc.OuterXml);
+
                             byte[] bytes = Encoding.UTF8.GetBytes(nativeDoc.OuterXml);
 
                             MD5 md5 = new MD5CryptoServiceProvider();
@@ -103,6 +107,7 @@ public class ManaData
                             if (PlayerPrefs.GetString("config") != Encoding.UTF8.GetString(md5.ComputeHash(bytes)))
                             {
                                 Debug.Log("Damage");
+                                ManaDebug.Log("Damage");
 
                                 DamageLock = true;
 
@@ -150,8 +155,8 @@ public class ManaData
             PlayerPrefs.SetString("id", ManaServer.ID);
             PlayerPrefs.SetString("config", Encoding.UTF8.GetString(md5.ComputeHash(bytes)));
 
-            Debug.Log("Save Md5");
 
+            Debug.Log(PlayerDoc.OuterXml);
 
             Auxiliary.EncryptXml(PlayerDoc);
             

+ 15 - 7
Assets/Script/Manage/ManaDebug.cs

@@ -9,19 +9,27 @@ using System.Collections.Generic;
 
 using Random = UnityEngine.Random;
 
-public class ManaDebug : Regist 
+public class ManaDebug
 {
     #region 变量
 
-    private static Text Lab;
-
-    #endregion
-
-    public override void Instantiate()
+    public static Text Lab
     {
-        Lab = ManaReso.Get<Text>("E_ScrrLab");
+        get
+        {
+            if (Lab_ == null)
+            {
+                Lab = ManaReso.Get<Text>("E_ScrrLab", false);
+            }
+
+            return Lab_;
+        }
+        set { Lab_ = value; }
     }
 
+    private static Text Lab_;
+
+    #endregion
 
     public static void Log(string message)
     {

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

@@ -11,22 +11,24 @@ using System.Collections.Generic;
 
 using Random = UnityEngine.Random;
 
-public struct KV<T1,T2>
-{
-    public T1 Key;
-    public T2 Value;
-
-    public KV(T1 key, T2 value)
-    {
-        Key = key;
-        Value = value;
-    }
-}
-
 public class ManaGarden : Regist
 {
     #region 变量
 
+    public static int Slot
+    {
+        get { return Slot_; }
+        set
+        {
+            Slot_ = value;
+
+            ManaReso.SetText("G_CollectLab2", string.Format("{0}/{1}", Slot_, Page * 9));
+        }
+    }
+    public static int Page
+    {
+        get { return PageList.Count; }
+    }
     public static int MyFlower
     {
         get { return MyFlower_; }
@@ -81,22 +83,19 @@ public class ManaGarden : Regist
         }
     }
 
+    public static int Slot_;
     private static int MyFlower_;
     private static int MyFlowerSpec_;
     private static int MyFlowerRegu_;
     private static int TotalFlowerSpec_;
     private static int TotalFlowerRegu_;
 
-    public static int Page
-    {
-        get { return PageList.Count; }
-    }
-
-    public static int SlotAmt;
     public static int TotalFlower;
-    public static bool AwardValid = true;
+    public static bool AwardLock = true;
+
     public static float ElfTimer;
     public static float AwardTimer;
+
     public static FlowerInfo SeleInfo;
     public static ManaGarden Instance;
 
@@ -121,6 +120,7 @@ public class ManaGarden : Regist
         AwardThread();
     }
 
+
     public void ElfThread()
     {
         ElfTimer -= Time.fixedDeltaTime;
@@ -138,7 +138,7 @@ public class ManaGarden : Regist
 
     public void AwardThread()
     {
-        if (AwardValid)
+        if (AwardLock)
         {
             AwardTimer -= Time.fixedDeltaTime;
 
@@ -190,7 +190,7 @@ public class ManaGarden : Regist
             kv.Value.Unlock = false;
         }
 
-        SlotAmt = 0;
+        Slot = 0;
         MyFlowerSpec = 0;
         MyFlowerRegu = 0;
 
@@ -272,7 +272,7 @@ public class ManaGarden : Regist
         {
             if (SlotList[i].Valid)
             {
-                SlotAmt--;
+                Slot--;
 
                 SlotList[i].Valid = false;
                 SlotList[i].Available = false;
@@ -290,14 +290,14 @@ public class ManaGarden : Regist
         {
             if (SlotList[i].Valid == false)
             {
-                SlotAmt++;
+                Slot++;
                 
                 SlotList[i].Valid = true;
                 SlotList[i].Available = true;
                 
-                if (SlotAmt%9 == 7)
+                if (Slot%9 == 7)
                 {
-                    if (SlotAmt/9 + 2 >= Page)
+                    if (Slot/9 + 2 >= Page)
                     {
                         CreatePage();
                     }
@@ -306,10 +306,9 @@ public class ManaGarden : Regist
                 return;
             }
         }
-
-        ManaDebug.Log("所有土地已解锁");
     }
 
+
     public static void CreatePage()
     {
         Transform tra = ManaReso.Get("Page", Folder.Scene, false, ManaReso.Get("GardenPage"), false, ObjType.Page);
@@ -349,8 +348,7 @@ public class ManaGarden : Regist
 
         ManaReso.Get("H_FlowerCard").TweenForCG();
 
-
-        ManaLan.Add(ManaReso.Get<Text>("H_Lab"), new LanStr("FlowerName", flowerInfo.ID));
+        ManaReso.SetText("H_Lab", flowerInfo.Name);
 
 
         Image image = ManaReso.Get<Image>("H_Icon2");
@@ -389,6 +387,7 @@ public class ManaGarden : Regist
         if (flowerInfo.Plant)
         {
             ManaAudio.PlayClip(Clip.BtnClip);
+
             ShowFlowerCard(flowerInfo);
         }
         else
@@ -412,6 +411,7 @@ public class ManaGarden : Regist
             else
             {
                 slot.Plant(flowerInfo, true);
+
                 ManaAudio.PlayClip(Clip.FlowerClip);
             }
         }

+ 72 - 68
Assets/Script/Manage/ManaIAP.cs

@@ -1,22 +1,23 @@
-using System;
+using cn.sharesdk.unity3d;
+
 using UnityEngine;
+using UnityEngine.UI;
+using UnityEngine.Events;
+using UnityEngine.Purchasing;
+using UnityEngine.Advertisements;
 
+using System;
+using System.IO;
 using System.Collections;
 using System.Collections.Generic;
-using System.IO;
-using cn.sharesdk.unity3d;
-using UnityEngine.Advertisements;
-using UnityEngine.Events;
-using UnityEngine.Purchasing;
-using UnityEngine.UI;
 
 public class ManaIAP : MonoBehaviour, IStoreListener
 {
     #region 变量
 
-    public static bool LoadComplete;
-    public static UnityAction AdAction;
+    public static bool Complete;
     public static ManaIAP Instance;
+    public static UnityAction AdAction;
     public static IStoreController IStoreController;
     public static IExtensionProvider IExtensionProvider;
 
@@ -46,28 +47,17 @@ public class ManaIAP : MonoBehaviour, IStoreListener
         Instance = this;
     }
 
+
     public static void Initialize()
     {
-        InitializeAd();
-
-        ConfigurationBuilder cb = ConfigurationBuilder.Instance(StandardPurchasingModule.Instance());
-
-        cb.AddProduct("Test", ProductType.Consumable);
-        ProductList.Add("Test");
-
-        UnityPurchasing.Initialize(Instance, cb);
-
-        if (Application.isMobilePlatform || Application.platform == RuntimePlatform.IPhonePlayer)
-        {
-            ShareSdk = Instance.gameObject.AddComponent<ShareSDK>();
+        InitializeAD();
 
-            ShareSdk.Initialize();
+        InitializeIAP();
 
-            ShareSdk.shareHandler = ShareCallback;
-        }
+        InitializeShare();
     }
 
-    public static void InitializeAd()
+    public static void InitializeAD()
     {
         if (Application.platform == RuntimePlatform.IPhonePlayer)
         {
@@ -83,15 +73,38 @@ public class ManaIAP : MonoBehaviour, IStoreListener
         }
     }
 
+    public static void InitializeIAP()
+    {
+        ConfigurationBuilder cb = ConfigurationBuilder.Instance(StandardPurchasingModule.Instance());
+
+        cb.AddProduct("Test", ProductType.Consumable);
 
-    public static void PlayAd(UnityAction action)
+        ProductList.Add("Test");
+
+        UnityPurchasing.Initialize(Instance, cb);
+    }
+
+    public static void InitializeShare()
+    {
+        if (Application.isMobilePlatform || Application.platform == RuntimePlatform.IPhonePlayer)
+        {
+            ShareSdk = Instance.gameObject.AddComponent<ShareSDK>();
+
+            ShareSdk.Initialize();
+
+            ShareSdk.shareHandler = ShareCallback;
+        }
+    }
+
+
+    public static void PlayAD(UnityAction action)
     {
         if (Advertisement.IsReady())
         {
             AdAction = action;
 
             ShowOptions showOptions = new ShowOptions();
-            showOptions.resultCallback = AdCallback;
+            showOptions.resultCallback = CallbackAD;
 
             Advertisement.Show(showOptions);
         }
@@ -101,31 +114,12 @@ public class ManaIAP : MonoBehaviour, IStoreListener
 
             if (!Advertisement.isInitialized)
             {
-                InitializeAd();
+                InitializeAD();
             }
         }
     }
 
-    public static void Purchase(string id)
-    {
-        if (!LoadComplete)
-        {
-            Bubble.Show(null, Language.GetStr("IAP", "PurchaseFail"));
-
-            return;
-        }
-
-        if (!ProductList.Contains(id))
-        {
-            Bubble.Show(null, Language.GetStr("IAP", "PurchaseUnvalid"));
-
-            return;
-        }
-
-        IStoreController.InitiatePurchase(id);
-    }
-
-    public static void AdCallback(ShowResult showResult)
+    public static void CallbackAD(ShowResult showResult)
     {
         if (showResult == ShowResult.Finished)
         {
@@ -144,27 +138,38 @@ public class ManaIAP : MonoBehaviour, IStoreListener
     }
 
 
-    public PurchaseProcessingResult ProcessPurchase(PurchaseEventArgs e)
+    public static void Purchase(string id)
     {
-        Bubble.Show(null, Language.GetStr("IAP", "PurchaseSuccess"));
+        if (!Complete)
+        {
+            Bubble.Show(null, Language.GetStr("IAP", "PurchaseFail"));
 
-        ProductDic[e.purchasedProduct.definition.id].Invoke();
+            return;
+        }
 
-        return PurchaseProcessingResult.Complete;
+        if (!ProductList.Contains(id))
+        {
+            Bubble.Show(null, Language.GetStr("IAP", "PurchaseUnvalid"));
+
+            return;
+        }
+
+        IStoreController.InitiatePurchase(id);
     }
 
 
     public void OnInitialized(IStoreController controller, IExtensionProvider extensions)
     {
-        LoadComplete = true;
+        Complete = true;
         IStoreController = controller;
         IExtensionProvider = extensions;
+
         ManaDebug.Log("初始化IAP成功");
     }
 
     public void OnInitializeFailed(InitializationFailureReason error)
     {
-        LoadComplete = false;
+        Complete = false;
 
         Debug.Log("初始化IAP失败");
         ManaDebug.Log("初始化IAP失败");
@@ -175,29 +180,29 @@ public class ManaIAP : MonoBehaviour, IStoreListener
         Bubble.Show(null, Language.GetStr("IAP", "PurchaseFail"));
     }
 
+    public PurchaseProcessingResult ProcessPurchase(PurchaseEventArgs e)
+    {
+        Bubble.Show(null, Language.GetStr("IAP", "PurchaseSuccess"));
+
+        ProductDic[e.purchasedProduct.definition.id].Invoke();
+
+        return PurchaseProcessingResult.Complete;
+    }
+
 
     public static void Share()
     {
         ShareContent shareContent = new ShareContent();
         
-        shareContent.SetTitle(Language.GetStr("Common", "ShareTit"));
         shareContent.SetText(Language.GetStr("Common", "ShareContent"));
+        shareContent.SetTitle(Language.GetStr("Common", "ShareTit"));
+
         shareContent.SetUrl(ShareUrl);
         shareContent.SetImagePath(ImageUrl);
+
         shareContent.SetShareType(ContentType.App);
         
-        PlatformType[] platformTypes = new[]
-        {
-            PlatformType.QQ,
-            PlatformType.QZone,
-            PlatformType.WeChat,
-            PlatformType.Facebook,
-            PlatformType.SinaWeibo,
-            PlatformType.GooglePlus,
-            PlatformType.WeChatMoments,
-        };
-
-        ShareSdk.ShowPlatformList(platformTypes, shareContent, 100, 100);
+        ShareSdk.ShowPlatformList(null, shareContent, 100, 100);
     }
 
     public static void Authorize()
@@ -207,7 +212,6 @@ public class ManaIAP : MonoBehaviour, IStoreListener
 
     public static void ShareCallback(int reqID, ResponseState state, PlatformType type, Hashtable result)
     {
-        ManaDebug.Log(state.ToString());
         if (state == ResponseState.Success)
         {
             ManaCenter.ShareAmt++;

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

@@ -1,9 +1,9 @@
 using UnityEngine;
+using UnityEngine.UI;
 
+using System.Text;
 using System.Collections;
 using System.Collections.Generic;
-using System.Text;
-using UnityEngine.UI;
 
 public class ManaInfo : Regist 
 {
@@ -36,7 +36,7 @@ public class ManaInfo : Regist
     {
         Timer -= Time.fixedDeltaTime;
 
-        if (Timer <= 0 && Lock == true)
+        if (Timer <= 0 && Lock)
         {
             Lock = false;
 

+ 116 - 131
Assets/Script/Manage/ManaMiniGame.cs

@@ -4,9 +4,10 @@ using UnityEngine.Serialization;
 
 using System;
 using System.Xml;
+using System.Text;
 using System.Collections;
 using System.Collections.Generic;
-using System.Text;
+
 using Random = UnityEngine.Random;
 
 public class Award
@@ -19,6 +20,7 @@ public class Award
 
     public int DiamondMin;
     public int DiamondMax;
+
     public string CoinFml;
     public string FlowerFml;
     public string DiamondFml;
@@ -28,40 +30,6 @@ public class Award
 
     #endregion
 
-    public Award(XmlAttributeCollection attribute)
-    {
-        Flower.CoinFml = attribute[8].Value;
-        DropGold.CoinFml = attribute[7].Value;
-
-        CoinFml = attribute[1].Value;
-        FlowerFml = attribute[4].Value;
-        DiamondFml = attribute[3].Value;
-        
-        string[] strings = attribute[2].Value.Split(',');
-
-        DiamondMin = int.Parse(strings[0]);
-        DiamondMax = int.Parse(strings[1]);
-
-        strings = attribute[5].Value.Split(',');
-
-        Odds = new List<float>()
-        {
-            float.Parse(strings[0]),
-            float.Parse(strings[1]),
-            float.Parse(strings[2]),
-        };
-
-        strings = attribute[6].Value.Split(',');
-
-        Standard = new List<float>()
-        {
-            float.Parse(strings[0]),
-            float.Parse(strings[1]),
-            float.Parse(strings[2]),
-        };
-    }
-
-
     public void GetAward(int score)
     {
         #region 获得奖励
@@ -98,7 +66,7 @@ public class Award
         #region Coin
 
         int coin = (int)Auxiliary.FmlParse(CoinFml, "s", score.ToString(), "l", Mathf.Clamp(ManaCenter.Level, 1, 9999).ToString());
-        coin = (int) (coin*(1 + ManaCenter.SkillPlus) + BonusCoin);
+        coin = (int)(coin * (1 + ManaCenter.SkillPlus) + BonusCoin);
 
         ManaCenter.Coin += coin;
 
@@ -110,12 +78,12 @@ public class Award
 
         int diamond = 0;
         float diamondRate = (float)Auxiliary.FmlParse(DiamondFml, "l", Mathf.Clamp(ManaCenter.Level, 1, 1000).ToString());
-        
+
         if (Random.Range(0, 1f) <= diamondRate)
         {
             diamondFlag = true;
 
-            diamond = (int) (Mathf.Lerp(DiamondMin, DiamondMax, Random.Range(0, 1f)) + BonusDiamond);
+            diamond = (int)(Mathf.Lerp(DiamondMin, DiamondMax, Random.Range(0, 1f)) + BonusDiamond);
 
             ManaCenter.Diamond += diamond;
 
@@ -132,7 +100,7 @@ public class Award
                 diamond = BonusDiamond;
 
                 ManaCenter.Diamond += diamond;
-                
+
                 ManaReso.SetActive("Da_Diamond", true);
 
                 sb.AppendFormat("{0}{1}{2}    ", Language.GetStr("UI", "J_Info0"), "<(钻石)>", diamond);
@@ -149,14 +117,10 @@ public class Award
 
             FlowerInfo flowerInfo = ManaGarden.FlowerInfoDic[1];
 
-            Vector2 newSize = flowerInfo.Icon.rect.size;
-            newSize.x *= 0.2f;
-            newSize.y *= 0.2f;
-
             ManaReso.Get<Image>("Da_FlowerIcon").sprite = flowerInfo.Icon;
-            ManaReso.Get<Image>("Da_FlowerIcon").rectTransform.sizeDelta = newSize;
+            ManaReso.Get<Image>("Da_FlowerIcon").Resize(0.2f, 0.2f);
 
-            ManaReso.SetText("Da_FlowerLab", Language.GetStr("FlowerName", "Flower" + flowerInfo.ID_));
+            ManaReso.SetText("Da_FlowerLab", flowerInfo.Name);
 
             sb.AppendFormat("{0}{1}{2}", Language.GetStr("UI", "J_Info0"), "<(花朵)>", flowerInfo.Name);
         }
@@ -176,14 +140,10 @@ public class Award
                         {
                             flowerFlag = true;
 
-                            Vector2 newSize = flowerInfo.Icon.rect.size;
-                            newSize.x *= 0.2f;
-                            newSize.y *= 0.2f;
-
                             ManaReso.Get<Image>("Da_FlowerIcon").sprite = flowerInfo.Icon;
-                            ManaReso.Get<Image>("Da_FlowerIcon").rectTransform.sizeDelta = newSize;
+                            ManaReso.Get<Image>("Da_FlowerIcon").Resize(0.2f, 0.2f);
 
-                            ManaReso.SetText("Da_FlowerLab", Language.GetStr("FlowerName", "Flower" + flowerInfo.ID_));
+                            ManaReso.SetText("Da_FlowerLab", flowerInfo.Name);
 
                             sb.AppendFormat("{0}{1}{2}", Language.GetStr("UI", "J_Info0"), "<(花朵)>", flowerInfo.Name);
 
@@ -253,15 +213,15 @@ public class Award
 
 
         float timeCoin = Mathf.Lerp(0, 1.5f, Mathf.Clamp01(coin / 15f));
-        float timeScore = Mathf.Lerp(0, 1.5f, Mathf.Clamp01(score/50f));
+        float timeScore = Mathf.Lerp(0, 1.5f, Mathf.Clamp01(score / 50f));
         float timeDiamond = Mathf.Lerp(0, 1.5f, Mathf.Clamp01(diamond / 15f));
-        
+
         float time = Mathf.Max(timeCoin, timeDiamond);
 
         ManaReso.Get("Da_CoinLab").CreateTweenNumber(0, coin, time, false, true, Curve.EaseOutQuad);
         ManaReso.Get("Da_ScoreLab").CreateTweenNumber(0, score, timeScore, false, true, Curve.EaseOutQuad);
         ManaReso.Get("Da_DiamondLab").CreateTweenNumber(0, diamond, time, false, true, Curve.EaseOutQuad);
-        
+
         #endregion
 
 
@@ -504,9 +464,42 @@ public class Award
 
         #endregion
     }
-}
 
 
+    public Award(XmlAttributeCollection attribute)
+    {
+        Flower.CoinFml = attribute[8].Value;
+        DropGold.CoinFml = attribute[7].Value;
+
+        CoinFml = attribute[1].Value;
+        FlowerFml = attribute[4].Value;
+        DiamondFml = attribute[3].Value;
+        
+        string[] strings = attribute[2].Value.Split(',');
+
+        DiamondMin = int.Parse(strings[0]);
+        DiamondMax = int.Parse(strings[1]);
+
+        strings = attribute[5].Value.Split(',');
+
+        Odds = new List<float>()
+        {
+            float.Parse(strings[0]),
+            float.Parse(strings[1]),
+            float.Parse(strings[2]),
+        };
+
+        strings = attribute[6].Value.Split(',');
+
+        Standard = new List<float>()
+        {
+            float.Parse(strings[0]),
+            float.Parse(strings[1]),
+            float.Parse(strings[2]),
+        };
+    }
+}
+
 public class ManaMiniGame : Regist 
 {
     #region 变量
@@ -518,7 +511,7 @@ public class ManaMiniGame : Regist
         {
             Score_ = value;
 
-            ManaReso.SetText("D_ScoreLab", ScoreLab + Score_.ToString());
+            ManaReso.SetText("D_ScoreLab", ScoreLab + Score_);
         }
     }
     public static bool Game
@@ -599,6 +592,7 @@ public class ManaMiniGame : Regist
             TimerLab.text = (GameTime-GameTimer_).ToString("0.0");
 
             TimerBk.fillAmount = GameTimer_/GameTime;
+
             TimerBk.material.SetFloat("_Fill", TimerBk.fillAmount);
         }
     }
@@ -609,35 +603,44 @@ public class ManaMiniGame : Regist
     private static bool Panalty_;
     private static float GameTimer_;
 
-    public static Text BtnLab;
     public static Text TimerLab;
     public static Text PrepareLab;
+
     public static Image TimerBk;
     public static Award Award;
+
     public static List<Drop> DropList = new List<Drop>();
     public static List<Flower> OpList = new List<Flower>();
     public static List<Flower> IdleList = new List<Flower>();
 
     public static int Flower;
     public static int MiniGameIndex;
+    public static string ScoreLab;
+
     public static bool Prepare;
-    public static bool TutorialValidA = true;
+    public static bool TutorialLock = true;
     public static bool DropDiamond;
-    public static float OpTime = 1.5f;
+
     public static float OpTimer;
     public static float GoldTimer;
-    public static float GameTime = 5;
-    public static float PanaltyTime = 1;
-    public static float NewOpTime;
     public static float PanaltyTimer;
     public static float PrepareTimer;
     public static float DiamondTimer;
-    public static string ScoreLab;
+
+    public static float OpTime = 1.5f;
+    public static float GameTime = 45;
+    public static float PanaltyTime = 1;
+    public static float NewOpTime;
 
     #endregion
 
     private void FixedUpdate()
     {
+        if (Pause)
+        {
+            return;
+        }
+
         if (Game)
         {
             GameThread();
@@ -652,12 +655,8 @@ public class ManaMiniGame : Regist
 
     private void GameThread()
     {
-        if (Pause)
-        {
-            return;
-        }
-
         GameTimer += Time.fixedDeltaTime;
+
         if (GameTimer >= GameTime)
         {
             GameOver();
@@ -694,12 +693,8 @@ public class ManaMiniGame : Regist
 
     private void BonusThread()
     {
-        if (Pause)
-        {
-            return;
-        }
-
         GoldTimer -= Time.fixedDeltaTime;
+
         if (GoldTimer < 0)
         {
             GoldTimer = Random.Range(3f, 6f);
@@ -710,6 +705,7 @@ public class ManaMiniGame : Regist
         if (DropDiamond)
         {
             DiamondTimer -= Time.fixedDeltaTime;
+
             if (DiamondTimer < 0)
             {
                 DropDiamond = false;
@@ -721,11 +717,6 @@ public class ManaMiniGame : Regist
 
     private void PrepareThread()
     {
-        if (Pause)
-        {
-            return;
-        }
-        
         PrepareTimer -= Time.fixedDeltaTime;
 
         if (PrepareTimer <= 0)
@@ -736,47 +727,6 @@ public class ManaMiniGame : Regist
         }
     }
 
-    private void CreateOperate()
-    {
-        ManaAudio.PlayClip(Clip.BubbleClip);
-
-        if (ManaTutorial.TutorialA && TutorialValidA)
-        {
-            Pause = true;
-            TutorialValidA = false;
-
-            Flower flower = IdleList[4];
-            flower.CreateOp(OpList.Count, OpType.Water);
-
-            OpList.Add(flower);
-            IdleList.Remove(flower);
-
-            Tutorial.HightScreen(ManaReso.Get("D_WaterArrow0"), ManaReso.Get("D_WaterArrow1"), ManaReso.Get("D_Water1"));
-
-            Tutorial.SetArea(OpList[0].OperateIcon.transform, 0.1f, 0.125f);
-
-            ManaReso.AddButtonEventOnetime
-            (
-                "D_Water2",
-                () =>
-                {
-                    Pause = false;
-
-                    Tutorial.HightDisable();
-                }
-            );
-        }
-        else
-        {
-            Flower flower = IdleList[Random.Range(0, IdleList.Count)];
-
-            flower.CreateOp(OpList.Count);
-
-            OpList.Add(flower);
-            IdleList.Remove(flower);
-        }
-    }
-
 
     public override void RegistValueA()
     {
@@ -787,14 +737,12 @@ public class ManaMiniGame : Regist
 
     public override void RegistReference()
     {
-        BtnLab = ManaReso.Get<Text>("D_BeginLab");
         TimerLab = ManaReso.Get<Text>("D_TimerLab");
         PrepareLab = ManaReso.Get<Text>("D_PrepareLab");
 
         TimerBk = ManaReso.Get<Image>("D_TimerIcon");
     }
 
-    #region MiniGame
 
     public static void Operate(OpType opType)
     {
@@ -811,12 +759,12 @@ public class ManaMiniGame : Regist
 
             if (OpList.Count >= 2)
             {
-                OpList[0].FirstOp();
-                OpList[1].SecondOp();
+                OpList[0].SetFirstOp();
+                OpList[1].SetSecondOp();
             }
             else if (OpList.Count >= 1)
             {
-                OpList[0].FirstOp();
+                OpList[0].SetFirstOp();
             }
         }
         else
@@ -826,6 +774,47 @@ public class ManaMiniGame : Regist
         }
     }
 
+    public static void CreateOperate()
+    {
+        ManaAudio.PlayClip(Clip.BubbleClip);
+
+        if (ManaTutorial.TutorialA && TutorialLock)
+        {
+            Pause = true;
+            TutorialLock = false;
+
+            Flower flower = IdleList[4];
+            flower.CreateOp(OpList.Count, OpType.Water);
+
+            OpList.Add(flower);
+            IdleList.Remove(flower);
+
+            Tutorial.HightScreen(ManaReso.Get("D_WaterArrow0"), ManaReso.Get("D_WaterArrow1"), ManaReso.Get("D_Water1"));
+
+            Tutorial.SetArea(OpList[0].OperateIcon.transform, 0.1f, 0.125f);
+
+            ManaReso.AddButtonEventOnetime
+            (
+                "D_Water2",
+                () =>
+                {
+                    Pause = false;
+
+                    Tutorial.HightDisable();
+                }
+            );
+        }
+        else
+        {
+            Flower flower = IdleList[Random.Range(0, IdleList.Count)];
+
+            flower.CreateOp(OpList.Count);
+
+            OpList.Add(flower);
+            IdleList.Remove(flower);
+        }
+    }
+
 
     public static void GameEnd()
     {
@@ -836,8 +825,6 @@ public class ManaMiniGame : Regist
             ManaCenter.MiniLock = false;
 
             ManaCenter.MiniTimer = Mathf.Lerp(180, 300, Random.Range(0, 1f));
-
-            ManaDebug.Log(string.Format("<color=red>{0:0}</color>秒后激活小游戏", ManaCenter.MiniTimer));
         }
 
         if (ManaCenter.MiniTimer <= 0)
@@ -899,9 +886,10 @@ public class ManaMiniGame : Regist
         }
         else
         {
-            Flower = Random.Range(0, ManaGarden.FlowerInfoDic.Count);
+            Flower = ManaGarden.FlowerInfoDic.Random().ID_;
         }
 
+
         int flowerAmt = 1;
 
         while (true)
@@ -922,6 +910,7 @@ public class ManaMiniGame : Regist
         }
 
         ScoreLab = Language.GetStr("UI", "D_ScoreLab");
+
         TimerBk.fillAmount = 0;
         TimerLab.text = GameTime.ToString("0");
 
@@ -944,8 +933,6 @@ public class ManaMiniGame : Regist
         NewOpTime = OpTime;
         DiamondTimer = Random.Range(0f, GameTime - 5);
 
-        ManaDebug.Log(string.Format("第<color=red>{0}</color>次小游戏", MiniGameIndex));
-
         for (int i = 0; i < IdleList.Count; i++)
         {
             IdleList[i].GameBegin();
@@ -983,8 +970,6 @@ public class ManaMiniGame : Regist
         PrepareLab.StreamForScale();
     }
 
-    #endregion
-
 
     public void OnApplicationPause(bool pause)
     {

+ 8 - 7
Assets/Script/Manage/ManaPlayer.cs

@@ -7,17 +7,18 @@ using System;
 using System.Xml;
 using System.Text;
 using System.Collections;
-using System.Collections.Generic;
 using System.Diagnostics;
+using System.Collections.Generic;
+
 using Transform = UnityEngine.Transform;
 
 public class ManaPlayer : Regist 
 {
     #region 变量
 
-    public static bool LoadComplete;
+    public static bool Complete;
     public static string SelePlayer = "PlayerBlond";
-    public static Transform SelePlayerTra;
+    public static Transform SeleTra;
 
     public static Player Player;
     public static Transform PlayerPink;
@@ -41,7 +42,7 @@ public class ManaPlayer : Regist
 
     public override void Instantiate()
     {
-        if (!LoadComplete)
+        if (!Complete)
         {
             UnityFactory.factory.LoadDragonBonesData(ManaReso.Load<TextAsset>("stand_ske", Folder.Config));
             UnityFactory.factory.LoadDragonBonesData(ManaReso.Load<TextAsset>("Closet_ske", Folder.Config));
@@ -49,7 +50,7 @@ public class ManaPlayer : Regist
             UnityFactory.factory.LoadTextureAtlasData(ManaReso.Load<TextAsset>("stand_tex", Folder.Config), "stand_texture");
             UnityFactory.factory.LoadTextureAtlasData(ManaReso.Load<TextAsset>("Closet_tex", Folder.Config), "Closet_texture");
 
-            LoadComplete = true;
+            Complete = true;
         }
 
         if (!ManaTutorial.TutorialA || ManaTutorial.TutorialIndexA != 1)
@@ -82,7 +83,7 @@ public class ManaPlayer : Regist
             PlayerBrown.localScale = new Vector3(0.8f, 0.8f, 0.8f);
 
             SelePlayer = "PlayerBlond";
-            SelePlayerTra = PlayerBlond;
+            SeleTra = PlayerBlond;
         }
     }
 
@@ -94,7 +95,7 @@ public class ManaPlayer : Regist
 
     public void GetPlayer(string type = null)
     {
-        string player = ManaData.GetPlayerString("Player");
+        string player;
 
         if (type == null)
         {

+ 65 - 157
Assets/Script/Manage/ManaReso.cs

@@ -7,11 +7,10 @@ using System.Collections;
 using System.Linq.Expressions;
 using System.ComponentModel;
 using System.Collections.Generic;
-using System.Diagnostics;
+
 using Object = UnityEngine.Object;
 using Random = UnityEngine.Random;
 using Component = UnityEngine.Component;
-using Debug = UnityEngine.Debug;
 
 public enum Folder
 {
@@ -83,16 +82,18 @@ public class ManaReso : Regist
 
     public static bool AsyncLoadLock;
     public static bool AsyncInstantiateLock;
-    public static Coroutine CoroAsync;
+
+    public static Coroutine CoroLoad;
     public static Coroutine CoroInstantiate;
+
     public static ManaReso Instance;
-    public static UnityAction OnAsyncLoadFinish;
 
     public static List<UnityAction> AsyncList = new List<UnityAction>();
     public static List<AssetBundleRequest> RequestList = new List<AssetBundleRequest>();
 
     public static List<KV<AsyncRequest, UnityAction>> InstantiateList = new List<KV<AsyncRequest, UnityAction>>();
 
+
     public static Dictionary<string, Object> ObjDic = new Dictionary<string, Object>();
     public static Dictionary<string, Transform> TraDic = new Dictionary<string, Transform>();
     public static Dictionary<GameObject, ObjType> ObjPoolDic = new Dictionary<GameObject, ObjType>();
@@ -103,15 +104,6 @@ public class ManaReso : Regist
 
     public override void RegistImmed()
     {
-        if (RegistFlag)
-        {
-            return;
-        }
-        else
-        {
-            RegistFlag = true;
-        }
-
         Instance = this;
 
         Transform objPool = new GameObject("ObjPool").transform;
@@ -121,13 +113,14 @@ public class ManaReso : Regist
 
         TraDic.Add(objPool.name, objPool);
 
-        CoroAsync = StartCoroutine(IAsyncLoad());
+        CoroLoad = StartCoroutine(IAsyncLoad());
         CoroInstantiate = StartCoroutine(IAsyncInstancitate());
     }
 
+
     #region TraDic
 
-    public static T Get<T>(string goName)
+    public static T Get<T>(string goName, bool warn = true)
     {
         Transform tra;
 
@@ -144,32 +137,46 @@ public class ManaReso : Regist
         }
         else
         {
-            throw new Exception(goName);
+            if (warn)
+            {
+                throw new Exception(goName);
+            }
+            else
+            {
+                return default(T);
+            }
         }
     }
 
-    public static T[] Gets<T>(string goName)
+    public static T[] Gets<T>(string goName, bool warn = true)
     {
         Transform tra;
 
         if (TraDic.TryGetValue(goName, out tra))
         {
-            T[] ts = tra.GetComponentsInChildren<T>();
+            T[] t = tra.GetComponentsInChildren<T>();
 
-            if (ts == null)
+            if (t == null)
             {
                 throw new Exception(goName);
             }
 
-            return ts;
+            return t;
         }
         else
         {
-            throw new Exception(goName);
+            if (warn)
+            {
+                throw new Exception(goName);
+            }
+            else
+            {
+                return default(T[]);
+            }
         }
     }
 
-    public static Transform Get(string goName)
+    public static Transform Get(string goName, bool warn = true)
     {
         Transform tra;
 
@@ -179,7 +186,14 @@ public class ManaReso : Regist
         }
         else
         {
-            throw new Exception(goName);
+            if (warn)
+            {
+                throw new Exception(goName);
+            }
+            else
+            {
+                return null;
+            }
         }
     }
 
@@ -199,12 +213,12 @@ public class ManaReso : Regist
     }
 
 
-    public static void Save<T>(T t, bool aware = false) where T : Component
+    public static void Save<T>(T t, bool warn = false) where T : Component
     {
         Save(t.gameObject);
     }
 
-    public static void Save(GameObject go, bool aware = false)
+    public static void Save(GameObject go, bool warn = false)
     {
         ObjType objType;
 
@@ -219,7 +233,7 @@ public class ManaReso : Regist
         {
             if (traList.Contains(go.transform))
             {
-                if (aware)
+                if (warn)
                 {
                     return;
                 }
@@ -404,11 +418,12 @@ public class ManaReso : Regist
         }
     }
 
-    public static Sprite LoadSprite(string goName)
+    public static Sprite LoadSprite(string goName, Folder folder)
     {
-        return Load<Sprite>(goName, Folder.UI);
+        return Load<Sprite>(goName, folder);
     }
 
+
     public static Transform Get(string goName, Folder folder, bool compile, Transform par, bool worldSpace, ObjType objType = ObjType.Null, Type type = null)
     {
         Transform tra = Get(objType);
@@ -457,6 +472,14 @@ public class ManaReso : Regist
                 tra.localPosition = prefab.transform.position;
             }
 
+            if (type != null)
+            {
+                if (tra.GetComponent(type) == null)
+                {
+                    tra.AddComponent(type);
+                }
+            }
+
             return tra;
         }
     }
@@ -500,6 +523,14 @@ public class ManaReso : Regist
 
             tra.position = pos;
 
+            if (type != null)
+            {
+                if (tra.GetComponent(type) == null)
+                {
+                    tra.AddComponent(type);
+                }
+            }
+
             return tra;
         }
     }
@@ -702,31 +733,6 @@ public class ManaReso : Regist
         KV<AsyncRequest, UnityAction> kv = new KV<AsyncRequest, UnityAction>();
 
         AssetBundleRequest bundleRequest = Bundle.LoadAsync(goName, folder);
-
-        //if (folder == Folder.UI)
-        //{
-        //    bundleRequest = Bundle.UI.LoadAssetAsync(goName);
-        //}
-        //else if (folder == Folder.Audio)
-        //{
-        //    bundleRequest = Bundle.Audio.LoadAssetAsync(goName);
-        //}
-        //else if (folder == Folder.Config)
-        //{
-        //    bundleRequest = Bundle.Config.LoadAssetAsync(goName);
-        //}
-        //else if (folder == Folder.Effect)
-        //{
-        //    bundleRequest = Bundle.Effect.LoadAssetAsync(goName);
-        //}
-        //else if (folder == Folder.Scene)
-        //{
-        //    bundleRequest = Bundle.Scene.LoadAssetAsync(goName);
-        //}
-        //else
-        //{
-        //    throw new Exception();
-        //}
         
         AsyncRequest asyncRequest = new AsyncRequest();
         asyncRequest.Request = bundleRequest;
@@ -743,37 +749,12 @@ public class ManaReso : Regist
         InstantiateList.Add(kv);
     }
 
-    public static void AsyncLoad(string goName, int amt, Folder folder, ObjType objType, bool ui = false, bool canvas = false, UnityAction callback = null, Type type = null)
+    public static void AsyncLoad(string goName, int amt, Folder folder, ObjType objType, bool ui = false, bool canvas = false, UnityAction callback = null)
     {
         KV<AsyncRequest, UnityAction> kv = new KV<AsyncRequest, UnityAction>();
 
         AssetBundleRequest bundleRequest = Bundle.LoadAsync(goName, folder);
 
-        //if (folder == Folder.UI)
-        //{
-        //    bundleRequest = Bundle.UI.LoadAssetAsync(goName);
-        //}
-        //else if (folder == Folder.Audio)
-        //{
-        //    bundleRequest = Bundle.Audio.LoadAssetAsync(goName);
-        //}
-        //else if (folder == Folder.Config)
-        //{
-        //    bundleRequest = Bundle.Config.LoadAssetAsync(goName);
-        //}
-        //else if (folder == Folder.Effect)
-        //{
-        //    bundleRequest = Bundle.Effect.LoadAssetAsync(goName);
-        //}
-        //else if (folder == Folder.Scene)
-        //{
-        //    bundleRequest = Bundle.Scene.LoadAssetAsync(goName);
-        //}
-        //else
-        //{
-        //    throw new Exception();
-        //}
-
         AsyncRequest asyncRequest = new AsyncRequest();
         asyncRequest.Request = bundleRequest;
         asyncRequest.Callback = callback;
@@ -801,11 +782,6 @@ public class ManaReso : Regist
 
             ObjPoolDic.Add(go, objType);
 
-            if (type != null)
-            {
-                go.AddComponent(type);
-            }
-
             go.name = go.name.Replace("(Clone)", "");
 
             Save(go);
@@ -816,6 +792,7 @@ public class ManaReso : Regist
             }
         };
 
+
         RequestList.Add(bundleRequest);
 
         for (int i = 0; i < amt; i++)
@@ -835,13 +812,13 @@ public class ManaReso : Regist
         );
     }
 
-    public static void AddAsyncLoad(string goName, int amt, Folder folder, ObjType objType, bool ui = false, bool canvas = false, UnityAction callback = null, Type type = null)
+    public static void AddAsyncLoad(string goName, int amt, Folder folder, ObjType objType, bool ui = false, bool canvas = false, UnityAction callback = null)
     {
         AsyncList.Add
         (
             () =>
             {
-                AsyncLoad(goName, amt, folder, objType, ui, canvas, callback, type);
+                AsyncLoad(goName, amt, folder, objType, ui, canvas, callback);
             }
         );
     }
@@ -855,7 +832,6 @@ public class ManaReso : Regist
                 KV<AsyncRequest, UnityAction> kv = new KV<AsyncRequest, UnityAction>();
 
                 AssetBundleRequest bundleRequest = Bundle.LoadAsync("Player", Folder.Scene);
-                //Bundle.Scene.LoadAssetAsync("Player");
                 
                 AsyncRequest asyncRequest = new AsyncRequest();
                 asyncRequest.Request = bundleRequest;
@@ -921,7 +897,7 @@ public class ManaReso : Regist
 
     public void StopAsync()
     {
-        StopCoroutine(CoroAsync);
+        StopCoroutine(CoroLoad);
         StopCoroutine(CoroInstantiate);
     }
 
@@ -929,19 +905,13 @@ public class ManaReso : Regist
     {
         while (true)
         {
-            if (RequestList.Count == 0 && !AsyncLoadLock)
-            {
-                OnAsyncLoadFinish.SafeInvoke();
-                OnAsyncLoadFinish = null;
-            }
-
             if (RequestList.Count > 0)
             {
                 yield return null;
             }
             else
             {
-                if (AsyncList.Count > 0 && !AsyncLoadLock)
+                if (AsyncList.Valid() && !AsyncLoadLock)
                 {
                     AsyncLoadLock = true;
 
@@ -1020,66 +990,4 @@ public class ManaReso : Regist
             }
         }
     }
-
-
-    public void Read()
-    {
-        StartCoroutine(IRead1());
-        StartCoroutine(IRead2());
-        StartCoroutine(IRead3());
-    }
-
-    public static IEnumerator IRead1()
-    {
-        WWW www = new WWW(Application.streamingAssetsPath + "/Icon/ShareIcon.png");
-
-        yield return www;
-
-        if (string.IsNullOrEmpty(www.error))
-        {
-            Get<RawImage>("RawImage").texture = www.texture;
-
-            ManaDebug.Log("1 good");
-        }
-        else
-        {
-            ManaDebug.Log("1 fail");
-        }
-    }
-
-    public static IEnumerator IRead2()
-    {
-        WWW www = new WWW("file://" + Application.streamingAssetsPath + "/Icon/ShareIcon.png");
-
-        yield return www;
-
-        if (string.IsNullOrEmpty(www.error))
-        {
-            Get<RawImage>("RawImage").texture = www.texture;
-
-            ManaDebug.Log("2 good");
-        }
-        else
-        {
-            ManaDebug.Log("2 fail");
-        }
-    }
-
-    public static IEnumerator IRead3()
-    {
-        WWW www = new WWW("file:///" + Application.streamingAssetsPath + "/Icon/ShareIcon.png");
-
-        yield return www;
-
-        if (string.IsNullOrEmpty(www.error))
-        {
-            Get<RawImage>("RawImage").texture = www.texture;
-
-            ManaDebug.Log("3 good");
-        }
-        else
-        {
-            ManaDebug.Log("3 fail");
-        }
-    }
 }

+ 20 - 10
Assets/Script/Manage/ManaServer.cs

@@ -1,15 +1,14 @@
 using LitJson;
 
 using UnityEngine;
+using UnityEngine.UI;
 using UnityEngine.Events;
 
 using System;
-using System.Collections;
 using System.Net;
-using System.Net.Mail;
-using System.Security.Cryptography.X509Certificates;
 using System.Text;
-using UnityEngine.UI;
+using System.Net.Mail;
+using System.Collections;
 
 public class MyCredentials : ICredentialsByHost
 {
@@ -59,8 +58,10 @@ public class ManaServer : Regist
 
     public static float Timer;
     public static bool Complete;
-    public static string ReportStr;
+
     public static string ID = "Default";
+    public static string ReportContent;
+
     public static JsonData JsonData;
     public static DateTime Time;
 
@@ -76,18 +77,27 @@ public class ManaServer : Regist
             {
                 Complete = true;
 
+                Debug.Log(Initializer.Complete + " " + ManaServer.Complete + " " + ManaCenter.Complete);
+                ManaDebug.Log(Initializer.Complete + " " + ManaServer.Complete + " " + ManaCenter.Complete);
+
                 ManaCenter.LoginCallbackInitial(new JsonData());
             }
-            else if (Timer >= 15f && Timer <= 10)
+            else if (Timer >= 15f && Timer <= 20)
             {
                 Timer += 10;
 
+                Debug.Log(Initializer.Complete + " " + ManaServer.Complete + " " + ManaCenter.Complete);
+                ManaDebug.Log(Initializer.Complete + " " + ManaServer.Complete + " " + ManaCenter.Complete);
+
                 Login(ManaCenter.LoginCallbackInitial);
             }
             else if (Timer >= 2.5f && Timer <= 10)
             {
                 Timer += 10;
 
+                Debug.Log(Initializer.Complete + " " + ManaServer.Complete + " " + ManaCenter.Complete);
+                ManaDebug.Log(Initializer.Complete + " " + ManaServer.Complete + " " + ManaCenter.Complete);
+
                 Login(ManaCenter.LoginCallbackInitial);
             }
         }
@@ -176,7 +186,7 @@ public class ManaServer : Regist
         URLRequest.CreateURLRequest("https://garden.dashgame.com/index.php/home/user/load", urlData, callback, URLRequest.Method.POST);
     }
 
-    public static void Random(URLRequest.URLRequestJsonCallBackDelegate callback)
+    public static void RandomLoad(URLRequest.URLRequestJsonCallBackDelegate callback)
     {
         URLRequestData urlData = new URLRequestData();
 
@@ -196,7 +206,7 @@ public class ManaServer : Regist
         {
             Bubble.Show(null, Language.GetStr("UI", "Lb_Send2"));
         }
-        else if(ReportStr == str)
+        else if(ReportContent == str)
         {
             Bubble.Show(null, Language.GetStr("UI", "Lb_Send1"));
         }
@@ -208,9 +218,9 @@ public class ManaServer : Regist
 
             mailMessage.From = new MailAddress("dashgamegarden@163.com");
 
-            ReportStr = str;
+            ReportContent = str;
 
-            mailMessage.Body = ReportStr + '\n' + GetSystemInfo();
+            mailMessage.Body = ReportContent + '\n' + GetSystemInfo();
 
             mailMessage.Subject = ID + " MyLovelyGargen Issue";
 

+ 7 - 5
Assets/Script/Manage/ManaSign.cs

@@ -25,7 +25,6 @@ public class Sign
         }
         set { Coin_ = value; }
     }
-
     public int Diamond
     {
         get
@@ -46,10 +45,12 @@ public class Sign
     public int Diamond_;
 
     public float RoundBuff;
+
     public Text Lab1;
     public Text Lab2;
     public Image Icon;
     public Image Mark;
+
     public List<int> FlowerList = new List<int>();
 
     #endregion
@@ -76,6 +77,7 @@ public class Sign
         SetUI();
     }
 
+
     public void Get()
     {
         Mark.SetActive(true);
@@ -117,7 +119,7 @@ public class Sign
         {
             ManaReso.SetText("Bb_InfoLabB", Diamond.ToString());
 
-            ManaReso.SetSprite("Bb_IconB", ManaReso.Load<Sprite>("钻石", Folder.UI));
+            ManaReso.SetSprite("Bb_IconB", ManaReso.LoadSprite("钻石", Folder.UI));
 
             ManaReso.SetActive("Bb_IconB", true);
 
@@ -127,7 +129,7 @@ public class Sign
         {
             ManaReso.SetText("Bb_InfoLabB", Coin.ToString());
 
-            ManaReso.SetSprite("Bb_IconB", ManaReso.Load<Sprite>("金币", Folder.UI));
+            ManaReso.SetSprite("Bb_IconB", ManaReso.LoadSprite("金币", Folder.UI));
 
             ManaReso.SetActive("Bb_IconB", true);
 
@@ -159,13 +161,13 @@ public class Sign
         
         if (Diamond > 0)
         {
-            Icon.sprite = ManaReso.Load<Sprite>("钻石", Folder.UI);
+            Icon.sprite = ManaReso.LoadSprite("钻石", Folder.UI);
             
             Lab1.text = Diamond.ToString();
         }
         else if (Coin > 0)
         {
-            Icon.sprite = ManaReso.Load<Sprite>("金币", Folder.UI);
+            Icon.sprite = ManaReso.LoadSprite("金币", Folder.UI);
             
             Lab1.text = Coin.ToString();
         }

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

@@ -60,6 +60,10 @@ public class ManaTutorial : Regist
     public static bool PayExempt_;
     public static bool ConnectExempt_;
 
+    public static int PayExemptAmt;
+    public static int ConnectExemptAmt;
+
+    public static bool TutorialA;
     public static bool TutorialB;
     public static bool TutorialC;
     public static bool TutorialB_;
@@ -69,10 +73,6 @@ public class ManaTutorial : Regist
     public static int TutorialIndexB;
     public static int TutorialIndexC;
 
-    public static int PayExemptAmt;
-    public static int ConnectExemptAmt;
-    public static bool TutorialA;
-
     #endregion
 
     public override void Instantiate()
@@ -83,22 +83,14 @@ public class ManaTutorial : Regist
         }
     }
 
-
     public override void RegistValueC()
     {
         ManaReso.Get<Image>("N_Mask").material = ManaReso.Load<Material>("UIMaskMat", Folder.Effect);
 
-        Tutorial.Arrow = ManaReso.Get("N_Arrow");
-        Tutorial.Material = ManaReso.Get<Image>("N_Mask").material;
-
         if (TutorialA)
         {
             ManaReso.Get("TutorialMask").AddScript<SceneMask>();
 
-            ManaReso.Get("PlayerBk1").CreateMove2D();
-            ManaReso.Get("PlayerBk2").CreateMove2D();
-            ManaReso.Get("PlayerBk3").CreateMove2D();
-
             ManaReso.Get("Tutorial").CreateTweenSr(0, 1, 1f, true, true, Curve.EaseOutQuad, false, true).AlphaOnly = true;
             ManaReso.Get("PlayerBk1").CreateTweenScale(new Vector3(0.75f, 0.75f, 0.75f), new Vector3(0.9f, 0.9f, 0.9f), 1f, true, true, Curve.EaseOutQuad);
             ManaReso.Get("PlayerBk2").CreateTweenScale(new Vector3(0.75f, 0.75f, 0.75f), new Vector3(0.9f, 0.9f, 0.9f), 1f, true, true, Curve.EaseOutQuad);
@@ -108,13 +100,11 @@ public class ManaTutorial : Regist
 
             if (TutorialIndexA == 1)
             {
-                PrepareStepA1();
+                EnterA1();
             }
             else if (TutorialIndexA == 2)
             {
-                Garden.Instance.TutorialToRegular();
-
-                PrepareStepA2();
+                EnterA2();
             }
             else if (TutorialIndexA == 4)
             {
@@ -136,70 +126,68 @@ public class ManaTutorial : Regist
                 Garden.Instance.TutorialToRegular();
                 ManaUI.Instance.TutorialToRegular();
 
-                PrepareStepA6();
+                EnterA6();
             }
         }
     }
 
 
-    public static void EndStepA1()
+    public static void EndA1()
     {
-        Garden.Instance.TutorialToRegular();
-
         Destroy(ManaReso.Get("PlayerBk1").gameObject);
         Destroy(ManaReso.Get("PlayerBk2").gameObject);
         Destroy(ManaReso.Get("PlayerBk3").gameObject);
 
-        PrepareStepA2();
+        EnterA2();
     }
 
-    public static void EndStepA2()
+    public static void EndA2()
     {
         Tutorial.HightDisable();
 
-        PrepareStepA3();
+        EnterA3();
     }
 
-    public static void EndStepA3()
+    public static void EndA3()
     {
         Tutorial.HightDisable();
 
         ManaReso.SetActive("D_Quit", true);
 
-        PrepareStepA4();
+        EnterA4();
     }
 
-    public static void EndStepA4()
+    public static void EndA4()
     {
         Tutorial.HightDisable();
 
-        PrepareStepA5();
+        EnterA5();
     }
 
-    public static void EndStepA5()
+    public static void EndA5()
     {
-        PrepareStepA6();
+        EnterA6();
     }
 
-    public static void EndStepA6()
+    public static void EndA6()
     {
         Tutorial.HightDisable();
 
-        PrepareStepA7();
+        EnterA7();
     }
 
-    public static void EndStepA7()
+    public static void EndA7()
     {
         Tutorial.HightDisable(0, true);
 
-        PrepareStepA8();
+        EnterA8();
     }
 
-    public static void EndStepA8()
+    public static void EndA8()
     {
         Tutorial.HightDisable(0, true);
 
-        PrepareStepA9();
+        EnterA9();
     }
 
     public static void EndA()
@@ -218,13 +206,13 @@ public class ManaTutorial : Regist
     }
 
 
-    public static void PrepareStepA1()
+    public static void EnterA1()
     {
         TutorialIndexA = 1;
 
-        ManaPlayer.PlayerPink.CreateTweenScale(new Vector3(0.9f, 0.9f, 0.9f), 1f, true, true, Curve.EaseOutQuad);
-        ManaPlayer.PlayerBlond.CreateTweenScale(new Vector3(0.9f, 0.9f, 0.9f), 1f, true, true, Curve.EaseOutQuad);
-        ManaPlayer.PlayerBrown.CreateTweenScale(new Vector3(0.9f, 0.9f, 0.9f), 1f, true, true, Curve.EaseOutQuad);
+        ManaPlayer.PlayerPink.CreateTweenScale(0.9f, 1f, true, true, Curve.EaseOutQuad);
+        ManaPlayer.PlayerBlond.CreateTweenScale(0.9f, 1f, true, true, Curve.EaseOutQuad);
+        ManaPlayer.PlayerBrown.CreateTweenScale(0.9f, 1f, true, true, Curve.EaseOutQuad);
 
         ManaReso.Get("PlayerBk2").TweenForScale();
         ManaPlayer.PlayerBlond.TweenForScale();
@@ -243,7 +231,7 @@ public class ManaTutorial : Regist
             "N_Confirm",
             () =>
             {
-                Transform tra = ManaPlayer.SelePlayerTra;
+                Transform tra = ManaPlayer.SeleTra;
 
                 ManaPlayer.Player = tra.GetComponent<Player>();
 
@@ -264,6 +252,7 @@ public class ManaTutorial : Regist
                 tra.TweenForVec();
                 tra.TweenForScale();
 
+
                 ManaReso.Get("N_Confirm").TweenBacCG();
 
                 TweenRoot tween = ManaReso.Get("Tutorial").TweenBacSr();
@@ -273,17 +262,18 @@ public class ManaTutorial : Regist
                     EventType.BackwardFinish,
                     () =>
                     {
-                        EndStepA1();
+                        EndA1();
                     }
                 );
             }
         );
     }
 
-    public static void PrepareStepA2()
+    public static void EnterA2()
     {
         TutorialIndexA = 2;
 
+        Garden.Instance.TutorialToRegular();
         ManaUI.Instance.TutorialToRegular();
 
         ManaReso.Get("C_Group").TweenForCG();
@@ -296,6 +286,7 @@ public class ManaTutorial : Regist
 
         ManaReso.SetActive("N_Tutorial", true);
 
+
         TweenRoot tween = ManaReso.Get("N_Mask").TweenForGra();
 
         tween.AddEventOnetime
@@ -312,12 +303,12 @@ public class ManaTutorial : Regist
             "C_MiniGame",
             () =>
             {
-                EndStepA2();
+                EndA2();
             }
         );
     }
 
-    public static void PrepareStepA3()
+    public static void EnterA3()
     {
         ManaReso.Get("Tutorial").SetCollider(false);
 
@@ -349,12 +340,12 @@ public class ManaTutorial : Regist
             "Da_GetAward",
             () =>
             {
-                EndStepA3();
+                EndA3();
             }
         );
     }
 
-    public static void PrepareStepA4()
+    public static void EnterA4()
     {
         TutorialIndexA = 4;
 
@@ -367,7 +358,7 @@ public class ManaTutorial : Regist
             {
                 ManaReso.Get("Tutorial").SetCollider(true);
 
-                ManaReso.Get<SpriteRenderer>("TutorialMask").material.SetColor("_Color", Color.white);
+                ManaReso.Get<SpriteRenderer>("TutorialMask").material.SetAlpha("_Color", 1);
 
                 ManaReso.SetActive("TutorialMask", true);
                 ManaReso.SetActive("TutorialCollider", true);
@@ -379,7 +370,7 @@ public class ManaTutorial : Regist
         );
     }
 
-    public static void PrepareStepA5()
+    public static void EnterA5()
     {
         TweenRoot tween = ManaReso.Get("G_Flower").TweenForCG();
 
@@ -420,12 +411,12 @@ public class ManaTutorial : Regist
             EventType.BackwardFinish,
             () =>
             {
-                EndStepA5();
+                EndA5();
             }
         );
     }
 
-    public static void PrepareStepA6()
+    public static void EnterA6()
     {
         TutorialIndexA = 6;
 
@@ -451,12 +442,12 @@ public class ManaTutorial : Regist
             "C_Manage",
             () =>
             {
-                EndStepA6();
+                EndA6();
             }
         );
     }
 
-    public static void PrepareStepA7()
+    public static void EnterA7()
     {
         TweenRoot tween = ManaReso.Get("F_Manage0").GetTweenVec();
 
@@ -501,14 +492,15 @@ public class ManaTutorial : Regist
                     () =>
                     {
                         ManaReso.Get("Fe_Info").TweenBacCG();
-                        EndStepA7();
+
+                        EndA7();
                     }
                 );
             }
         );
     }
 
-    public static void PrepareStepA8()
+    public static void EnterA8()
     {
         TweenRoot tween = ManaReso.Get("Fe_Info").GetTweenCG();
 
@@ -552,14 +544,14 @@ public class ManaTutorial : Regist
                     () =>
                     {
                         ManaReso.Get("Fe_Info").TweenBacCG();
-                        EndStepA8();
+                        EndA8();
                     }
                 );
             }
         );
     }
 
-    public static void PrepareStepA9()
+    public static void EnterA9()
     {
         TweenRoot tween = ManaReso.Get("Fe_Info").GetTweenCG();
 
@@ -586,7 +578,7 @@ public class ManaTutorial : Regist
     }
 
 
-    public static void EndStepC1()
+    public static void EndC1()
     {
         Tutorial.HightDisable();
     }
@@ -603,7 +595,8 @@ public class ManaTutorial : Regist
         ConnectExemptAmt = 0;
     }
 
-    public static void PrepareStepC1()
+
+    public static void EnterC1()
     {
         TutorialC = true;
         TutorialC_ = false;
@@ -659,9 +652,9 @@ public class ManaTutorial : Regist
                                     {
                                         EndC();
 
-                                        //EndStepC1();
+                                        //EndC1();
 
-                                        //PrepareStepC2();
+                                        //EnterC2();
                                     }
                                 );
                             }
@@ -672,7 +665,7 @@ public class ManaTutorial : Regist
         );
     }
 
-    public static void PrepareStepC2()
+    public static void EnterC2()
     {
         TweenRoot tween = ManaReso.Get("I_BlackMask").GetTweenCG();
 
@@ -705,7 +698,7 @@ public class ManaTutorial : Regist
     }
 
 
-    public static void EndStepB1()
+    public static void EndB1()
     {
         Tutorial.HightDisable();
     }
@@ -720,7 +713,8 @@ public class ManaTutorial : Regist
         ConnectExemptAmt = 0;
     }
 
-    public static void PrepareStepB1()
+
+    public static void EnterB1()
     {
         TutorialB = false;
         TutorialB_ = false;
@@ -736,7 +730,7 @@ public class ManaTutorial : Regist
 
         if (skill.ItemStatus == SkillStatus.Upgrade)
         {
-            PrepareStepB3();
+            EnterB3();
         }
         else
         {
@@ -775,7 +769,7 @@ public class ManaTutorial : Regist
                         "Fe_Btn",
                         () =>
                         {
-                            EndStepB1();
+                            EndB1();
 
                             move = ManaReso.Get("MainCamera").CreateZoom2D();
 
@@ -784,7 +778,7 @@ public class ManaTutorial : Regist
                                 EventType.ForwardFinish,
                                 () =>
                                 {
-                                    PrepareStepB2();
+                                    EnterB2();
                                 }
                             );
                         }
@@ -794,7 +788,7 @@ public class ManaTutorial : Regist
         }
     }
 
-    public static void PrepareStepB2()
+    public static void EnterB2()
     {
         ManaReso.Get("N_Mask").TweenForGra();
 
@@ -860,7 +854,7 @@ public class ManaTutorial : Regist
         );
     }
 
-    public static void PrepareStepB3()
+    public static void EnterB3()
     {
         TweenRoot tween = ManaReso.Get("Fe_Info").TweenBacCG();
 
@@ -923,4 +917,10 @@ public class ManaTutorial : Regist
             }
         );
     }
-}
+}
+
+#region DebugList
+
+//教程结束后各部分能否正常运行
+
+#endregion

+ 47 - 29
Assets/Script/Manage/ManaUI.cs

@@ -53,15 +53,6 @@ public class ManaUI : Regist
 
     public override void RegistImmed()
     {
-        if (RegistFlag)
-        {
-            return;
-        }
-        else
-        {
-            RegistFlag = true;
-        }
-
         Transform = transform;
     }
 
@@ -178,6 +169,7 @@ public class ManaUI : Regist
             () =>
             {
                 ManaReso.Get("B_SignIn").TweenBacCG();
+
                 ManaAudio.PlayClip(Clip.BtnClip);
             }
         );
@@ -212,6 +204,7 @@ public class ManaUI : Regist
             () =>
             {
                 ManaAudio.PlayClip(Clip.BtnClip);
+
                 ManaReso.Get("L_Setting").TweenForCG();
             }
         );
@@ -230,6 +223,7 @@ public class ManaUI : Regist
             () =>
             {
                 ManaReso.Get("M_Achieve0").TweenForVec();
+
                 ManaAudio.PlayClip(Clip.BtnClip);
             }
         );
@@ -244,6 +238,7 @@ public class ManaUI : Regist
             () =>
             {
                 ManaReso.Get("F_Manage0").TweenForVec();
+
                 ManaAudio.PlayClip(Clip.BtnClip);
             }
         );
@@ -264,6 +259,7 @@ public class ManaUI : Regist
                 ManaReso.Get("D_MiniGame").TweenForCG();
 
                 ManaMiniGame.GameEnter();
+
                 ManaAudio.PlayClip(Clip.BubbleClip);
             }
         );
@@ -442,12 +438,8 @@ public class ManaUI : Regist
 
                 FlowerInfo flowerInfo = ManaGarden.FlowerInfoDic[ManaMiniGame.Flower];
 
-                Vector2 newSize = flowerInfo.Icon.rect.size;
-                newSize.x *= 0.2f;
-                newSize.y *= 0.2f;
-
                 ManaReso.Get<Image>("Da_FlowerIcon").sprite = flowerInfo.Icon;
-                ManaReso.Get<Image>("Da_FlowerIcon").rectTransform.sizeDelta = newSize;
+                ManaReso.Get<Image>("Da_FlowerIcon").Resize(0.2f, 0.2f);
 
                 ManaReso.SetText("Da_FlowerLab", Language.GetStr("FlowerName", "Flower" + flowerInfo.ID_));
 
@@ -540,7 +532,7 @@ public class ManaUI : Regist
             ManaReso.SetText("D_BeginLab", Language.GetStr("UI", "D_BeginLab0"));
             ManaReso.SetText("D_StatusLab", Language.GetStr("UI", "D_StatusLab0"));
 
-            ManaGarden.AwardValid = false;
+            ManaGarden.AwardLock = false;
         };
 
         tween.OnForwardFinish += () =>
@@ -560,7 +552,7 @@ public class ManaUI : Regist
 
             ManaAudio.MusicTheme.TweenForAudio();
 
-            ManaGarden.AwardValid = true;
+            ManaGarden.AwardLock = true;
 
             for (int i = 0; i < ManaMiniGame.IdleList.Count; i++)
             {
@@ -655,6 +647,7 @@ public class ManaUI : Regist
             () =>
             {
                 ManaAudio.PlayClip(Clip.BtnClip);
+
                 ManaReso.Get("Da_Info").TweenBacCG();
 
                 ManaMiniGame.Pause = false;
@@ -834,6 +827,7 @@ public class ManaUI : Regist
             () =>
             {
                 ManaAudio.PlayClip(Clip.CloseClip);
+
                 ManaReso.Get("F_Manage").TweenBacGra();
             }
         );
@@ -1058,7 +1052,8 @@ public class ManaUI : Regist
             () =>
             {
                 ManaAudio.PlayClip(Clip.BtnClip);
-                Bubble.Show(Language.GetStr("UI", "F_PersonBtn0"), Language.GetStr("UI", "F_PersonBtn1"), ManaReso.Load<Sprite>("绿-免费金币", Folder.UI));
+
+                Bubble.Show(Language.GetStr("UI", "F_PersonBtn0"), Language.GetStr("UI", "F_PersonBtn1"), ManaReso.LoadSprite("绿-免费金币", Folder.UI));
             }
         );
 
@@ -1080,7 +1075,8 @@ public class ManaUI : Regist
             () =>
             {
                 ManaAudio.PlayClip(Clip.BtnClip);
-                Bubble.Show(Language.GetStr("UI", "F_CoinPersonBtn0"), Language.GetStr("UI", "F_CoinPersonBtn1"), ManaReso.Load<Sprite>("绿-免费金币", Folder.UI));
+
+                Bubble.Show(Language.GetStr("UI", "F_CoinPersonBtn0"), Language.GetStr("UI", "F_CoinPersonBtn1"), ManaReso.LoadSprite("绿-免费金币", Folder.UI));
             }
         );
 
@@ -1109,6 +1105,7 @@ public class ManaUI : Regist
             () =>
             {
                 ManaAudio.PlayClip(Clip.CloseClip);
+
                 ManaReso.Get("Fe_Info").TweenBacCG();
             }
         );
@@ -1124,6 +1121,7 @@ public class ManaUI : Regist
             () =>
             {
                 ManaAudio.PlayClip(Clip.BtnClip);
+
                 ManaReso.Get<Button>("Fg_Btn").interactable = false;
 
                 ManaReso.SetText("Fg_Lab", Language.GetStr("UI", "Fg_Lab1"));
@@ -1142,6 +1140,7 @@ public class ManaUI : Regist
             () =>
             {
                 ManaAudio.PlayClip(Clip.CloseClip);
+
                 ManaReso.Get("Fg_Reconnect").TweenBacCG();
             }
         );
@@ -1176,6 +1175,7 @@ public class ManaUI : Regist
             () =>
             {
                 ManaAudio.PlayClip(Clip.CloseClip);
+
                 ManaReso.Get("G_Flower").TweenBacCG();
             }
         );
@@ -1285,6 +1285,7 @@ public class ManaUI : Regist
             () =>
             {
                 ManaAudio.PlayClip(Clip.CloseClip);
+
                 ManaReso.Get("H_FlowerCard").TweenBacCG();
             }
         );
@@ -1300,6 +1301,7 @@ public class ManaUI : Regist
             () =>
             {
                 ManaAudio.PlayClip(Clip.BtnClip);
+
                 ManaReso.Get("H_FlowerCard").TweenBacCG();
 
                 ManaGarden.RetriveFlower();
@@ -1398,6 +1400,7 @@ public class ManaUI : Regist
             () =>
             {
                 ManaAudio.PlayClip(Clip.CloseClip);
+
                 ManaReso.Get("L_Setting").TweenBacCG();
             }
         );
@@ -1405,28 +1408,30 @@ public class ManaUI : Regist
         #endregion
 
 
-        #region L_ReportBtn
+
+        #region L_ShareBtn
 
         ManaReso.SetButtonEvent
         (
-            "L_ReportBtn",
+            "L_ShareBtn",
             () =>
             {
+                ManaIAP.Share();
+
                 ManaAudio.PlayClip(Clip.BtnClip);
-                ManaReso.Get("Lb_Info").TweenForCG();
             }
         );
 
         #endregion
-
-        #region L_ShareBtn
+        
+        #region L_AudioBtn
 
         ManaReso.SetButtonEvent
         (
-            "L_ShareBtn",
+            "L_AudioBtn",
             () =>
             {
-                ManaIAP.Share();
+                ManaAudio.Instance.AudioSwitch();
 
                 ManaAudio.PlayClip(Clip.BtnClip);
             }
@@ -1442,21 +1447,23 @@ public class ManaUI : Regist
             () =>
             {
                 ManaAudio.PlayClip(Clip.BtnClip);
+
                 ManaAudio.Instance.MusicSwitch();
             }
         );
 
         #endregion
-
-        #region L_AudioBtn
+        
+        #region L_ReportBtn
 
         ManaReso.SetButtonEvent
         (
-            "L_AudioBtn",
+            "L_ReportBtn",
             () =>
             {
-                ManaAudio.Instance.AudioSwitch();
                 ManaAudio.PlayClip(Clip.BtnClip);
+
+                ManaReso.Get("Lb_Info").TweenForCG();
             }
         );
 
@@ -1470,6 +1477,7 @@ public class ManaUI : Regist
             () =>
             {
                 ManaAudio.PlayClip(Clip.BtnClip);
+
                 ManaReso.Get("La_Info").TweenForCG();
             }
         );
@@ -1485,6 +1493,7 @@ public class ManaUI : Regist
             () =>
             {
                 ManaAudio.PlayClip(Clip.BtnClip);
+
                 ManaReso.Get<Button>("L_TraChi").interactable = false;
                 ManaReso.Get<Button>("L_SimChi").interactable = true;
                 ManaReso.Get<Button>("L_English").interactable = true;
@@ -1507,6 +1516,7 @@ public class ManaUI : Regist
             () =>
             {
                 ManaAudio.PlayClip(Clip.BtnClip);
+
                 ManaReso.Get<Button>("L_TraChi").interactable = true;
                 ManaReso.Get<Button>("L_SimChi").interactable = false;
                 ManaReso.Get<Button>("L_English").interactable = true;
@@ -1529,6 +1539,7 @@ public class ManaUI : Regist
             () =>
             {
                 ManaAudio.PlayClip(Clip.BtnClip);
+
                 ManaReso.Get<Button>("L_TraChi").interactable = true;
                 ManaReso.Get<Button>("L_SimChi").interactable = true;
                 ManaReso.Get<Button>("L_English").interactable = false;
@@ -1558,6 +1569,7 @@ public class ManaUI : Regist
             () =>
             {
                 ManaAudio.PlayClip(Clip.CloseClip);
+
                 ManaReso.Get("La_Info").TweenBacCG();
             }
         );
@@ -1603,6 +1615,7 @@ public class ManaUI : Regist
             () =>
             {
                 ManaAudio.PlayClip(Clip.CloseClip);
+
                 ManaReso.Get("Lb_Info").TweenBacCG();
             }
         );
@@ -1638,12 +1651,15 @@ public class ManaUI : Regist
             () =>
             {
                 ManaAudio.PlayClip(Clip.CloseClip);
+
                 ManaReso.Get("M_Achieve").TweenBacGra();
             }
         );
 
         #endregion
 
+        #region M_Achieve
+
         tween = ManaReso.Get("M_Achieve").CreateTweenGra(new Color(0, 0, 0, 180 / 255f), 0.5f, true, true, Curve.EaseOutQuad);
 
         var tween2 = tween;
@@ -1687,6 +1703,8 @@ public class ManaUI : Regist
 
         #endregion
 
+        #endregion
+
         #region O
 
         ManaReso.Get("O_Toast").AddScript<Toast>();

+ 24 - 23
Assets/Script/Manage/ManaVisit.cs

@@ -1,11 +1,12 @@
-using UnityEngine;
+using LitJson;
+
+using UnityEngine;
+using UnityEngine.UI;
+using UnityEngine.Events;
 
 using System.Xml;
 using System.Collections;
 using System.Collections.Generic;
-using LitJson;
-using UnityEngine.Events;
-using UnityEngine.UI;
 
 public class ManaVisit  
 {
@@ -134,7 +135,7 @@ public class ManaVisit
         ManaReso.SetActive("C_Return", false);
         ManaReso.SetActive("C_Garden", false);
 
-        ManaGarden.AwardValid = true;
+        ManaGarden.AwardLock = true;
 
         #region Garden
 
@@ -154,14 +155,14 @@ public class ManaVisit
 
         Garden.ResetPage();
 
-        for (int i = 0; i < ManaGarden.SlotAmt / 7 + 2; i++)
+        for (int i = 0; i < ManaGarden.Slot / 7 + 2; i++)
         {
             ManaGarden.CreatePage();
         }
 
         for (int i = 0; i < ManaGarden.SlotList.Count; i++)
         {
-            if (i < ManaGarden.SlotAmt)
+            if (i < ManaGarden.Slot)
             {
                 ManaGarden.SlotList[i].Valid = true;
                 ManaGarden.SlotList[i].Available = true;
@@ -264,7 +265,7 @@ public class ManaVisit
             ManaReso.SetActive("C_Return", true);
         }
 
-        ManaGarden.AwardValid = false;
+        ManaGarden.AwardLock = false;
 
         #region Bird Tree Rainbow
 
@@ -508,22 +509,9 @@ public class ManaVisit
 
     public static void GetArchive()
     {
-        ManaServer.Download
-        (
-            "ytcy9g",
-            (jsonData) =>
-            {
-                LoadComplete = true;
-
-                XmlStr = jsonData["l"].ToString();
-
-                Enter();
-            }
-        );
-
-
-        //ManaServer.Random
+        //ManaServer.Download
         //(
+        //    "ytcy9g",
         //    (jsonData) =>
         //    {
         //        LoadComplete = true;
@@ -535,6 +523,19 @@ public class ManaVisit
         //);
 
 
+        ManaServer.RandomLoad
+        (
+            (jsonData) =>
+            {
+                LoadComplete = true;
+
+                XmlStr = jsonData["l"].ToString();
+
+                Enter();
+            }
+        );
+
+
         //if (Random.Range(0f, 1f) <= CreatePosi)
         //{
         //    XmlDocument document = new XmlDocument();

+ 0 - 14
Assets/Script/Object/DropDiamond.cs

@@ -12,20 +12,6 @@ public class DropDiamond : Drop
     
     #endregion
 
-    public override void RegistImmed()
-    {
-        if (RegistFlag)
-        {
-            return;
-        }
-        else
-        {
-            RegistFlag = true;
-        }
-
-        base.RegistImmed();
-    }
-
     public override void OnPointerClick(PointerEventData eventData)
     {
         base.OnPointerClick(eventData);

+ 0 - 14
Assets/Script/Object/DropGold.cs

@@ -12,20 +12,6 @@ public class DropGold : Drop
 
     #endregion
 
-	public override void RegistImmed()
-    {
-        if (RegistFlag)
-        {
-            return;
-        }
-        else
-        {
-            RegistFlag = true;
-        }
-
-        base.RegistImmed();
-    }
-
     public override void OnPointerClick(PointerEventData eventData)
     {
         base.OnPointerClick(eventData);

+ 0 - 9
Assets/Script/Object/Elf.cs

@@ -23,15 +23,6 @@ public class Elf : Regist
 
     public override void RegistImmed()
     {
-        if (RegistFlag)
-        {
-            return;
-        }
-        else
-        {
-            RegistFlag = true;
-        }
-
         Root = transform.parent;
         Animator = GetComponent<Animator>();
     }

+ 17 - 26
Assets/Script/Object/Flower.cs

@@ -97,7 +97,7 @@ public class FlowerInfo
 
     public Sprite Icon
     {
-        get { return ManaReso.Load<Sprite>(Icon_, Folder.Scene); }
+        get { return ManaReso.LoadSprite(Icon_, Folder.Scene); }
     }
 
     public int ID_;
@@ -214,21 +214,21 @@ public class Flower : Regist, IPointerClickHandler
     {
         get
         {
-            return ManaReso.Load<Sprite>("Rip", Folder.UI);
+            return ManaReso.LoadSprite("Rip", Folder.UI);
         }
     }
     public Sprite WaterSprite
     {
         get
         {
-            return ManaReso.Load<Sprite>("Water", Folder.UI);
+            return ManaReso.LoadSprite("Water", Folder.UI);
         }
     }
     public Sprite FertilizeSprite
     {
         get
         {
-            return ManaReso.Load<Sprite>("Fertilize", Folder.UI);
+            return ManaReso.LoadSprite("Fertilize", Folder.UI);
         }
     }
     public FlowerInfo FlowerInfo
@@ -260,15 +260,6 @@ public class Flower : Regist, IPointerClickHandler
     
     public override void RegistImmed()
     {
-        if (RegistFlag)
-        {
-            return;
-        }
-        else
-        {
-            RegistFlag = true;
-        }
-
         enabled = true;
 
         Auxiliary.CompileDic(transform, ChildDic);
@@ -337,7 +328,7 @@ public class Flower : Regist, IPointerClickHandler
         OperateIcon.SetActive(false);
     }
 
-    public void FirstOp()
+    public void SetFirstOp()
     {
         OperateBk.TweenForScale();
 
@@ -348,19 +339,19 @@ public class Flower : Regist, IPointerClickHandler
         OperateOutline.SetActive(true);
     }
 
-    public void SecondOp()
+    public void SetThirdOp()
     {
-        OperateIcon.SetAlpha(1);
-        OperateOutline.SetAlpha(1);
+        OperateIcon.SetAlpha(0.5f);
+        OperateOutline.SetAlpha(0.5f);
 
         OperateIcon.SetActive(true);
         OperateOutline.SetActive(false);
     }
 
-    public void ThirdOp()
+    public void SetSecondOp()
     {
-        OperateIcon.SetAlpha(0.5f);
-        OperateOutline.SetAlpha(0.5f);
+        OperateIcon.SetAlpha(1);
+        OperateOutline.SetAlpha(1);
 
         OperateIcon.SetActive(true);
         OperateOutline.SetActive(false);
@@ -387,15 +378,15 @@ public class Flower : Regist, IPointerClickHandler
 
         if (sequence == 0)
         {
-            FirstOp();
+            SetFirstOp();
         }
         else if (sequence == 1)
         {
-            SecondOp();
+            SetSecondOp();
         }
         else
         {
-            ThirdOp();
+            SetThirdOp();
         }
     }
 
@@ -406,15 +397,15 @@ public class Flower : Regist, IPointerClickHandler
 
         if (sequence == 0)
         {
-            FirstOp();
+            SetFirstOp();
         }
         else if (sequence == 1)
         {
-            SecondOp();
+            SetSecondOp();
         }
         else
         {
-            ThirdOp();
+            SetThirdOp();
         }
     }
 

+ 2 - 11
Assets/Script/Object/Player.cs

@@ -45,15 +45,6 @@ public class Player : Regist
 
     public override void RegistImmed()
     {
-        if (RegistFlag)
-        {
-            return;
-        }
-        else
-        {
-            RegistFlag = true;
-        }
-
         enabled = true;
 
         Auxiliary.CompileDic(transform, ChildDic);
@@ -64,7 +55,7 @@ public class Player : Regist
 
     public UnityArmatureComponent Build()
     {
-        if (!ManaPlayer.LoadComplete)
+        if (!ManaPlayer.Complete)
         {
             UnityFactory.factory.LoadDragonBonesData(ManaReso.Load<TextAsset>("stand_ske", Folder.Config));
             UnityFactory.factory.LoadDragonBonesData(ManaReso.Load<TextAsset>("Closet_ske", Folder.Config));
@@ -72,7 +63,7 @@ public class Player : Regist
             UnityFactory.factory.LoadTextureAtlasData(ManaReso.Load<TextAsset>("stand_tex", Folder.Config), "stand_texture");
             UnityFactory.factory.LoadTextureAtlasData(ManaReso.Load<TextAsset>("Closet_tex", Folder.Config), "Closet_texture");
 
-            ManaPlayer.LoadComplete = true;
+            ManaPlayer.Complete = true;
         }
 
         UAC = UnityFactory.factory.BuildArmatureComponent("Armature");

+ 113 - 114
Assets/Script/Object/Skill/Ability.cs

@@ -6,6 +6,7 @@ using System.Xml;
 using System.Text;
 using System.Collections;
 using System.Collections.Generic;
+
 using Random = UnityEngine.Random;
 
 public class Ability : SkillRoot 
@@ -47,7 +48,8 @@ public class Ability : SkillRoot
 
     #endregion
 
-    protected bool ValidAnim = true;
+    protected bool ElfLock = true;
+
     protected string Elf;
     protected string Item;
 
@@ -85,14 +87,7 @@ public class Ability : SkillRoot
             {
                 ItemBtn.interactable = true;
 
-                if (UnlockCur == Current.Free)
-                {
-                    ManaLan.Add(ItemBtnLab, new LanStr("UI", "Fe_BtnLab1"));
-                }
-                else
-                {
-                    ItemBtnLab.text = Language.GetStr("UI", "Fe_BtnLab1") + "\n" + ImageParse(UnlockCur) + Auxiliary.ShrinkNumberStr(UnlockAmt);
-                }
+                ItemBtnLab.text = Language.GetStr("UI", "Fe_BtnLab1") + "\n" + ImageParse(UnlockCur) + Auxiliary.ShrinkNumberStr(UnlockAmt);
             }
             else if (ItemStatus_ == SkillStatus.Upgrade)
             {
@@ -145,6 +140,22 @@ public class Ability : SkillRoot
     }
 
 
+    public void UnlockTab()
+    {
+        ManaReso.Get<Graphic>("F_Elf").material = null;
+        ManaReso.Get<Graphic>("F_Store").material = null;
+        ManaReso.Get<Graphic>("F_Magic").material = null;
+
+        ManaReso.Get<Graphic>("F_ElfLab").material = null;
+        ManaReso.Get<Graphic>("F_StoreLab").material = null;
+        ManaReso.Get<Graphic>("F_MagicLab").material = null;
+
+        ManaReso.Get<Button>("F_Elf").interactable = true;
+        ManaReso.Get<Button>("F_Store").interactable = true;
+        ManaReso.Get<Button>("F_Magic").interactable = true;
+    }
+
+
     public override void Reactive()
     {
         if (Level > 0)
@@ -180,22 +191,19 @@ public class Ability : SkillRoot
 
         if (ItemStatus_ == SkillStatus.Upgrade)
         {
-            if (Level > 0)
+            for (int i = 0; i < Level - 1; i++)
             {
-                for (int i = 0; i < Level - 1; i++)
-                {
-                    NewUpgradeAmt = Auxiliary.FmlParse(UpgradeFml, "a", NewUpgradeAmt.ToString());
-                }
-                
-                UpgradeValue(ref NewPlus, Plus, UpgradePlus, 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);
+                NewUpgradeAmt = Auxiliary.FmlParse(UpgradeFml, "a", NewUpgradeAmt.ToString("0.00"));
             }
 
+            UpgradeValue(ref NewPlus, Plus, UpgradePlus, Level - 1);
+            UpgradeValue(ref NewPersonBuff, PersonBuff, UpgradePerson, Level - 1);
+            UpgradeSkillCdBuff(ref NewSkillCdBuff, UpgradeCD, Level - 1);
+
+            UpgradeValue(ref NewPerson, Person, UpgradePerson, Level - 1);
+            UpgradeValue(ref NewSkillCD, SkillCD, UpgradeCD, Level - 1);
+            UpgradeValue(ref NewCoinPerson, CoinPerson, UpgradePlus, Level - 1);
+
             UseA();
             UseC();
         }
@@ -206,7 +214,7 @@ public class Ability : SkillRoot
         ItemBtn.onClick.RemoveAllListeners();
         ItemBtn.onClick.AddListener(OnClick);
 
-        ItemLab.text = Description(0);
+        ItemLab.text = GetDescription(0);
     }
 
     public override void SwitchLanguage()
@@ -217,27 +225,11 @@ public class Ability : SkillRoot
     }
 
 
-    protected void UnlockTab()
-    {
-        ManaReso.Get<Graphic>("F_Elf").material = null;
-        ManaReso.Get<Graphic>("F_Store").material = null;
-        ManaReso.Get<Graphic>("F_Magic").material = null;
-
-        ManaReso.Get<Graphic>("F_ElfLab").material = null;
-        ManaReso.Get<Graphic>("F_StoreLab").material = null;
-        ManaReso.Get<Graphic>("F_MagicLab").material = null;
-
-        ManaReso.Get<Button>("F_Elf").interactable = true;
-        ManaReso.Get<Button>("F_Store").interactable = true;
-        ManaReso.Get<Button>("F_Magic").interactable = true;
-    }
-
-
     protected void UseA()
     {
-        if (ValidAnim)
+        if (ElfLock)
         {
-            ValidAnim = false;
+            ElfLock = false;
 
             if (!string.IsNullOrEmpty(Anim))
             {
@@ -247,7 +239,7 @@ public class Ability : SkillRoot
 
                     for (int i = 1; i < strings.Length; i++)
                     {
-                        ManaGarden.ElfList.Add((ObjType)Enum.Parse(typeof(ObjType), strings[i]));
+                        ManaGarden.ElfList.Add(strings[i].ToEnum<ObjType>());
                     }
 
                     Elf = strings[1];
@@ -320,6 +312,7 @@ public class Ability : SkillRoot
 
             flower.GetElf(ManaGarden.ElfList.Last(0), 0, 0, 0, 0);
 
+
             ManaReso.Get("Fe_Info").TweenBacCG();
 
             ManaReso.Get("F_Manage").TweenBacGra();
@@ -369,29 +362,34 @@ public class Ability : SkillRoot
         }
     }
 
+
     protected void Unlock()
     {
-        ManaCenter.Pay(ID, UnlockAmt, UnlockCur, () =>
-        {
-            ItemStatus = SkillStatus.Upgrade;
+        ManaCenter.Pay(
+            ID,
+            UnlockAmt,
+            UnlockCur,
+            () =>
+            {
+                ManaAudio.PlayClip(Clip.SkillClip);
 
-            ManaAudio.PlayClip(Clip.SkillClip);
+                ItemStatus = SkillStatus.Upgrade;
 
-            Level = 1;
+                Level = 1;
 
-            UseA();
-            UseB();
-            UseC();
+                UseA();
+                UseB();
+                UseC();
+                Zoom();
 
-            if (ID == "Ability1")
-            {
-                ManaCenter.Level = 1;
+                if (ID == "Ability1")
+                {
+                    ManaCenter.Level = 1;
 
-                UnlockTab();
+                    UnlockTab();
+                }
             }
-
-            Zoom();
-        });
+        );
     }
 
     protected void OnClick()
@@ -404,11 +402,13 @@ public class Ability : SkillRoot
 
         ManaReso.SetSprite("Fe_Icon", Icon);
 
+
         if (ItemStatus == SkillStatus.Lock)
         {
             ManaReso.SetText("Fe_Lab0", "");
-            ManaReso.SetText("Fe_Lab1", Description(0));
-            ManaReso.SetText("Fe_BtnLab", string.Format("{0}({1}{2:0})", Language.GetStr("UI", "Fe_BtnLab0"), ImageParse(UnlockAheadCur), UnlockAheadAmt));
+            ManaReso.SetText("Fe_Lab1", GetDescription(0));
+
+            ManaReso.SetText("Fe_BtnLab", string.Format("{0}({1}{2:0})", Language.GetStr("UI", "Fe_BtnLab0"), ImageParse(UnlockAheadCur), UnlockAheadAmt.ToString("0")));
 
             ManaReso.SetButtonEvent
             (
@@ -424,16 +424,9 @@ public class Ability : SkillRoot
         else if (ItemStatus == SkillStatus.UnLock)
         {
             ManaReso.SetText("Fe_Lab0", "");
-            ManaReso.SetText("Fe_Lab1", Description(0));
+            ManaReso.SetText("Fe_Lab1", GetDescription(0));
 
-            if (UnlockCur == Current.Free)
-            {
-                ManaReso.SetText("Fe_BtnLab", string.Format("{0}", Language.GetStr("UI", "Fe_BtnLab1")));
-            }
-            else
-            {
-                ManaReso.SetText("Fe_BtnLab", string.Format("{0}({1}{2:0})", Language.GetStr("UI", "Fe_BtnLab1"), ImageParse(UnlockCur), UnlockAmt));
-            }
+            ManaReso.SetText("Fe_BtnLab", string.Format("{0}({1}{2:0})", Language.GetStr("UI", "Fe_BtnLab1"), ImageParse(UnlockCur), UnlockAmt.ToString("0")));
             
             ManaReso.SetButtonEvent
             (
@@ -448,8 +441,9 @@ public class Ability : SkillRoot
         }
         else if (ItemStatus == SkillStatus.Upgrade)
         {
-            ManaReso.SetText("Fe_Lab0", Description(0));
-            ManaReso.SetText("Fe_Lab1", Description(1));
+            ManaReso.SetText("Fe_Lab0", GetDescription(0));
+            ManaReso.SetText("Fe_Lab1", GetDescription(1));
+
             ManaReso.SetText("Fe_BtnLab", string.Format("{0}({1}{2:0})", Language.GetStr("UI", "Fe_BtnLab2"), ImageParse(UpgradeCur), Auxiliary.ShrinkNumberStr(NewUpgradeAmt)));
 
             ManaReso.SetButtonEvent
@@ -459,13 +453,13 @@ public class Ability : SkillRoot
                 {
                     Upgrade();
 
-                    ItemLab.text = Description(0);
+                    ItemLab.text = GetDescription(0);
 
                     ItemBtnLab.text = Language.GetStr("UI", "Fe_BtnLab2") + "\n" + ImageParse(UpgradeCur) + Auxiliary.ShrinkNumberStr(NewUpgradeAmt);
 
                     ManaReso.SetText("Fe_Tit", Name);
-                    ManaReso.SetText("Fe_Lab0", Description(0));
-                    ManaReso.SetText("Fe_Lab1", Description(1));
+                    ManaReso.SetText("Fe_Lab0", GetDescription(0));
+                    ManaReso.SetText("Fe_Lab1", GetDescription(1));
 
                     ManaReso.SetText("Fe_BtnLab", string.Format("{0}({1}{2:0})", Language.GetStr("UI", "Fe_BtnLab2"), ImageParse(UpgradeCur), Auxiliary.ShrinkNumberStr(NewUpgradeAmt)));
                 }
@@ -475,56 +469,61 @@ public class Ability : SkillRoot
 
     protected void Upgrade()
     {
-        ManaCenter.Pay(ID, NewUpgradeAmt, UpgradeCur, () =>
-        {
-            Level += 1;
+        ManaCenter.Pay
+        (
+            ID,
+            NewUpgradeAmt,
+            UpgradeCur,
+            () =>
+            {
+                ManaAudio.PlayClip(Clip.SkillClip);
 
-            ManaAudio.PlayClip(Clip.SkillClip);
+                Level++;
 
-            Annul();
+                Annul();
 
-            NewUpgradeAmt = Auxiliary.FmlParse(UpgradeFml, "a", NewUpgradeAmt.ToString());
+                NewUpgradeAmt = Auxiliary.FmlParse(UpgradeFml, "a", NewUpgradeAmt.ToString("0.00"));
 
-            UpgradeValue(ref NewPerson, Person, UpgradePerson, 1);
-            UpgradeValue(ref NewSkillCD, SkillCD, UpgradeCD, 1);
-            UpgradeValue(ref NewCoinPerson, CoinPerson, UpgradePlus, 1);
+                UpgradeValue(ref NewPlus, Plus, UpgradePlus, 1);
+                UpgradeValue(ref NewPersonBuff, PersonBuff, UpgradePerson, 1);
+                UpgradeSkillCdBuff(ref NewSkillCdBuff, UpgradeCD, 1);
 
-            UpgradeValue(ref NewPlus, Plus, UpgradePlus, 1);
-            UpgradeSkillCdBuff(ref NewSkillCdBuff, UpgradeCD, 1);
-            UpgradeValue(ref NewPersonBuff, PersonBuff, UpgradePerson, 1);
+                UpgradeValue(ref NewPerson, Person, UpgradePerson, 1);
+                UpgradeValue(ref NewSkillCD, SkillCD, UpgradeCD, 1);
+                UpgradeValue(ref NewCoinPerson, CoinPerson, UpgradePlus, 1);
 
-            UseA();
-            UseB();
+                UseA();
+                UseB();
 
-            if (ID == "Ability1")
-            {
-                ManaCenter.Level += 1;
+                if (ID == "Ability1")
+                {
+                    ManaCenter.Level ++;
+                }
             }
-        });
+        );
     }
 
     protected void UnlockAhead()
     {
-        if (ItemStatus != SkillStatus.Lock)
-        {
-            Toast.Show(1.5f, "您并不需要提前解锁");
-
-            return;
-        }
-
-        ManaCenter.Pay(ID, UnlockAheadAmt, UnlockAheadCur, () =>
-        {
-            if (UnlockCur == Current.Free)
-            {
-                Unlock();
-            }
-            else
+        ManaCenter.Pay
+        (
+            ID,
+            UnlockAheadAmt,
+            UnlockAheadCur,
+            () =>
             {
                 ManaAudio.PlayClip(Clip.SkillClip);
 
-                ItemStatus = SkillStatus.UnLock;
+                if (UnlockCur == Current.Free)
+                {
+                    Unlock();
+                }
+                else
+                {
+                    ItemStatus = SkillStatus.UnLock;
+                }
             }
-        });
+        );
     }
 
 
@@ -596,7 +595,7 @@ public class Ability : SkillRoot
     }
 
 
-    protected override string Description(int offset)
+    protected override string GetDescription(int offset)
     {
         float temp;
         string[] strings = Desc.Split('[', ']');
@@ -613,7 +612,7 @@ public class Ability : SkillRoot
             {
                 #region MyRegion
 
-                if (Math.Abs(Person) > 0.0005f)
+                if (!Person.Equal(0))
                 {
                     temp = NewPerson;
 
@@ -632,7 +631,7 @@ public class Ability : SkillRoot
                         stringBuilder.Append(temp.ToString("0"));
                     }
                 }
-                else if (Math.Abs(PersonBuff) > 0.0005f)
+                else if (!PersonBuff.Equal(0))
                 {
                     temp = NewPersonBuff;
 
@@ -647,7 +646,7 @@ public class Ability : SkillRoot
             {
                 #region MyRegion
 
-                if (Math.Abs(SkillCD) > 0.0005f)
+                if (!SkillCD.Equal(0))
                 {
                     temp = NewSkillCD;
 
@@ -657,7 +656,7 @@ public class Ability : SkillRoot
 
                     stringBuilder.Append(temp.ToString("0"));
                 }
-                else if (Math.Abs(SkillCdBuff) > 0.0005f)
+                else if (!SkillCdBuff.Equal(0))
                 {
                     temp = NewSkillCdBuff;
 
@@ -672,7 +671,7 @@ public class Ability : SkillRoot
             {
                 #region MyRegion
 
-                if (Math.Abs(CoinPerson) > 0.0005f)
+                if (!CoinPerson.Equal(0))
                 {
                     temp = NewCoinPerson;
 
@@ -691,7 +690,7 @@ public class Ability : SkillRoot
                         stringBuilder.Append(temp.ToString("0"));
                     }
                 }
-                else if (Math.Abs(Plus) > 0.0005f)
+                else if (!Plus.Equal(0))
                 {
                     temp = NewPlus;
 

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

@@ -15,7 +15,7 @@ public class BigSkill : Skill
     {
         get
         {
-            return ManaReso.Load<Sprite>(Icon_ + "副", Folder.UI);
+            return ManaReso.LoadSprite(Icon_ + "副", Folder.UI);
         }
     }
 
@@ -211,7 +211,7 @@ public class BigSkill : Skill
         {
             BarBk1.sprite = BarIcon;
 
-            ItemLab.text = Description(0);
+            ItemLab.text = GetDescription(0);
 
             BarBtn.onClick.RemoveAllListeners();
             BarBtn.onClick.AddListener(Buy);
@@ -491,7 +491,7 @@ public class BigSkill : Skill
         if (ItemStatus == SkillStatus.Lock)
         {
             ManaReso.SetText("Fe_Lab0", "");
-            ManaReso.SetText("Fe_Lab1", Description(0));
+            ManaReso.SetText("Fe_Lab1", GetDescription(0));
             ManaReso.SetText("Fe_BtnLab", string.Format("{0}({1}{2:0})", Language.GetStr("UI", "Fe_BtnLab0"), ImageParse(UnlockAheadCur), UnlockAheadAmt));
 
             ManaReso.SetButtonEvent
@@ -508,7 +508,7 @@ public class BigSkill : Skill
         else if (ItemStatus == SkillStatus.UnLock)
         {
             ManaReso.SetText("Fe_Lab0", "");
-            ManaReso.SetText("Fe_Lab1", Description(0));
+            ManaReso.SetText("Fe_Lab1", GetDescription(0));
 
             if (UnlockCur == Current.Free)
             {
@@ -532,8 +532,8 @@ public class BigSkill : Skill
         }
         else if (ItemStatus == SkillStatus.Upgrade)
         {
-            ManaReso.SetText("Fe_Lab0", Description(0));
-            ManaReso.SetText("Fe_Lab1", Description(1));
+            ManaReso.SetText("Fe_Lab0", GetDescription(0));
+            ManaReso.SetText("Fe_Lab1", GetDescription(1));
             ManaReso.SetText("Fe_BtnLab", string.Format("{0}({1}{2:0})", Language.GetStr("UI", "Fe_BtnLab2"), ImageParse(UpgradeCur), Auxiliary.ShrinkNumberStr(NewUpgradeAmt)));
             
             ManaReso.SetButtonEvent
@@ -543,13 +543,13 @@ public class BigSkill : Skill
                 {
                     Upgrade();
 
-                    ItemLab.text = Description(0);
+                    ItemLab.text = GetDescription(0);
 
                     ItemBtnLab.text = Language.GetStr("UI", "Fe_BtnLab2") + "\n" + ImageParse(UpgradeCur) + Auxiliary.ShrinkNumberStr(NewUpgradeAmt);
 
                     ManaReso.SetText("Fe_Tit", Name);
-                    ManaReso.SetText("Fe_Lab0", Description(0));
-                    ManaReso.SetText("Fe_Lab1", Description(1));
+                    ManaReso.SetText("Fe_Lab0", GetDescription(0));
+                    ManaReso.SetText("Fe_Lab1", GetDescription(1));
 
                     ManaReso.SetText("Fe_BtnLab", string.Format("{0}({1}{2:0})", Language.GetStr("UI", "Fe_BtnLab2"), ImageParse(UpgradeCur), Auxiliary.ShrinkNumberStr(NewUpgradeAmt)));
                 }

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

@@ -161,7 +161,7 @@ public class Pack : SkillRoot
         ItemBtn.onClick.RemoveAllListeners();
         ItemBtn.onClick.AddListener(OnClick);
 
-        ItemLab.text = Description(0);
+        ItemLab.text = GetDescription(0);
 
         ManaLan.Add(ItemTit, new LanStr("SkillName", ID));
 
@@ -177,7 +177,7 @@ public class Pack : SkillRoot
             return;
         }
 
-        ItemLab.text = Description(0);
+        ItemLab.text = GetDescription(0);
 
         if (MaxUseLv == MinUseLv)
         {
@@ -260,7 +260,7 @@ public class Pack : SkillRoot
 
         if (ItemStatus == SkillStatus.Buy)
         {
-            ManaReso.SetText("Fe_Lab1", Description(0));
+            ManaReso.SetText("Fe_Lab1", GetDescription(0));
 
             ManaReso.SetText("Fe_BtnLab", string.Format("{0}({1}{2:0})", Language.GetStr("UI", "Fe_BtnLab3"), ImageParse(BuyCur), UseAmt));
 
@@ -362,7 +362,7 @@ public class Pack : SkillRoot
         }
     }
 
-    protected override string Description(int offset)
+    protected override string GetDescription(int offset)
     {
         string[] strings = Desc.Split('[', ']');
         

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

@@ -357,7 +357,7 @@ public class Skill : SkillRoot
 
 
                 ManaReso.SetText("Fe_Lab0", "");
-                ManaReso.SetText("Fe_Lab1", Description(0));
+                ManaReso.SetText("Fe_Lab1", GetDescription(0));
 
                 ManaReso.SetText("Fe_BtnLab", string.Format("{0}({1}{2:0})", Language.GetStr("UI", "Fe_BtnLab3"), ImageParse(BuyCur), UseAmt));
 
@@ -383,7 +383,7 @@ public class Skill : SkillRoot
 
 
             ManaReso.SetText("Fe_Lab0", "");
-            ManaReso.SetText("Fe_Lab1", Description(0));
+            ManaReso.SetText("Fe_Lab1", GetDescription(0));
 
             ManaReso.SetText("Fe_BtnLab", string.Format("{0}({1}{2:0})", Language.GetStr("UI", "Fe_BtnLab0"), ImageParse(UnlockAheadCur), UnlockAheadAmt));
 
@@ -489,7 +489,7 @@ public class Skill : SkillRoot
         ItemBtn.onClick.RemoveAllListeners();
         ItemBtn.onClick.AddListener(OnClick);
 
-        ItemLab.text = Description(0);
+        ItemLab.text = GetDescription(0);
 
         ItemStatus = ItemStatus;
     }
@@ -544,7 +544,7 @@ public class Skill : SkillRoot
         }
     }
 
-    protected override string Description(int offset)
+    protected override string GetDescription(int offset)
     {
         float temp;
         string[] strings = Desc.Split('[', ']');

+ 9 - 7
Assets/Script/Object/Skill/SkillRoot.cs

@@ -53,7 +53,7 @@ public abstract class SkillRoot
     {
         get
         {
-            return ManaReso.Load<Sprite>(Icon_, Folder.UI);
+            return ManaReso.LoadSprite(Icon_, Folder.UI);
         }
     }
     public string Desc
@@ -107,6 +107,7 @@ public abstract class SkillRoot
     public Text ItemBtnLab;
     public Image ItemIcon;
     public Button ItemBtn;
+
     public SkillTab SkillTab;
     public SkillType SkillType;
     public Transform SkillItem;
@@ -166,9 +167,9 @@ public abstract class SkillRoot
 
     public virtual void SwitchLanguage()
     {
-        if (ItemLab != null)
+        if (SkillTab != SkillTab.Null)
         {
-            ItemLab.text = Description(0);
+            ItemLab.text = GetDescription(0);
         }
     }
 
@@ -326,16 +327,17 @@ public abstract class SkillRoot
 
     protected void UpgradeValue(ref float target, float baseValue, string fml, int offset)
     {
-        if (Math.Abs(target) < 0.0005f)
+        if (target.Equal(0))
         {
             return;
         }
 
         if (string.IsNullOrEmpty(fml))
         {
-
+            return;
         }
-        else if (fml.Contains("%"))
+
+        if (fml.Contains("%"))
         {
             float step = float.Parse(fml.Replace("%", "")) / 100;
 
@@ -378,7 +380,7 @@ public abstract class SkillRoot
     }
 
 
-    protected virtual string Description(int offset)
+    protected virtual string GetDescription(int offset)
     {
         throw new Exception();
     }

+ 0 - 9
Assets/Script/Object/Slot.cs

@@ -41,15 +41,6 @@ public class Slot : Regist
 
 	public override void RegistImmed()
 	{
-        if (RegistFlag)
-        {
-            return;
-        }
-        else
-        {
-            RegistFlag = true;
-        }
-
         enabled = true;
 
         Icon = transform.GetChild(0).gameObject;

+ 20 - 22
Assets/Script/Object/Tutorial.cs

@@ -13,13 +13,21 @@ public class Tutorial : Regist, IPointerClickHandler
 {
     #region 变量
 
-    public static bool UIMask;
+    public static bool MaskLock;
     public static Material Material;
     public static Transform Arrow;
+
     public static List<Transform> HighLightList = new List<Transform>();
 
     #endregion
 
+    public override void RegistImmed()
+    {
+        Arrow = ManaReso.Get("N_Arrow");
+        Material = ManaReso.Get<Image>("N_Mask").material;
+    }
+
+
     public static void HightScene(float radiusX, float radiusY, Transform arrowPos, Transform target)
     {
         SetArea(target, radiusX, radiusY);
@@ -44,7 +52,7 @@ public class Tutorial : Regist, IPointerClickHandler
         canvas.sortingOrder = 1;
 
 
-        UIMask = true;
+        MaskLock = true;
 
         PointScreen(arrowPos.position, target);
 
@@ -64,7 +72,7 @@ public class Tutorial : Regist, IPointerClickHandler
         canvas.sortingOrder = 1;
 
 
-        UIMask = true;
+        MaskLock = true;
 
         PointScreen(arrowPos.position, targetPos);
 
@@ -93,7 +101,7 @@ public class Tutorial : Regist, IPointerClickHandler
 
         ClearArea();
 
-        UIMask = false;
+        MaskLock = false;
     }
 
     public static void HightDisable(int index, bool hideArrow)
@@ -119,7 +127,7 @@ public class Tutorial : Regist, IPointerClickHandler
 
         screenPos = new Vector3(screenPos.x / Screen.width, screenPos.y / Screen.height, 0);
 
-        if (UIMask)
+        if (MaskLock)
         {
             Material.SetFloat("_RadiusX", radiusX);
             Material.SetFloat("_RadiusY", radiusY);
@@ -133,7 +141,7 @@ public class Tutorial : Regist, IPointerClickHandler
 
     public static void ClearArea()
     {
-        if (UIMask)
+        if (MaskLock)
         {
             Material.SetFloat("_RadiusX", 0);
             Material.SetFloat("_RadiusY", 0);
@@ -145,6 +153,7 @@ public class Tutorial : Regist, IPointerClickHandler
         }
     }
 
+
     public static void PointScene(Vector3 pos, Transform tra)
     {
         Vector3 pointPos = Camera.main.WorldToScreenPoint(tra.position);
@@ -171,15 +180,12 @@ public class Tutorial : Regist, IPointerClickHandler
     public void OnPointerClick(PointerEventData eventData)
     {
         ManaAudio.PlayClip(Clip.BtnClip);
+
         if (eventData.rawPointerPress.name == "PlayerBk1")
         {
             Vector3 offset = ManaReso.Get("PlayerBk1").position;
             offset.x = -offset.x;
             offset.y = 0;
-            
-            //ManaReso.Get("PlayerBk1").GetMove2D().Pause();
-            //ManaReso.Get("PlayerBk2").GetMove2D().Pause();
-            //ManaReso.Get("PlayerBk3").GetMove2D().Pause();
 
             ManaReso.Get("PlayerBk1").MoveOffset2D(offset, 1f, false, Curve.EaseOutQuad);
             ManaReso.Get("PlayerBk2").MoveOffset2D(offset, 1f, false, Curve.EaseOutQuad);
@@ -194,7 +200,7 @@ public class Tutorial : Regist, IPointerClickHandler
             ManaPlayer.PlayerBrown.TweenForScale();
 
             ManaPlayer.SelePlayer = "PlayerBrown";
-            ManaPlayer.SelePlayerTra = ManaPlayer.PlayerBrown;
+            ManaPlayer.SeleTra = ManaPlayer.PlayerBrown;
         }
         else if (eventData.rawPointerPress.name == "PlayerBk2")
         {
@@ -202,10 +208,6 @@ public class Tutorial : Regist, IPointerClickHandler
             offset.x = -offset.x;
             offset.y = 0;
 
-            //ManaReso.Get("PlayerBk1").GetMove2D().Pause();
-            //ManaReso.Get("PlayerBk2").GetMove2D().Pause();
-            //ManaReso.Get("PlayerBk3").GetMove2D().Pause();
-
             ManaReso.Get("PlayerBk1").MoveOffset2D(offset, 1f, false, Curve.EaseOutQuad);
             ManaReso.Get("PlayerBk2").MoveOffset2D(offset, 1f, false, Curve.EaseOutQuad);
             ManaReso.Get("PlayerBk3").MoveOffset2D(offset, 1f, false, Curve.EaseOutQuad);
@@ -218,8 +220,8 @@ public class Tutorial : Regist, IPointerClickHandler
             ManaPlayer.PlayerBlond.TweenForScale();
             ManaPlayer.PlayerBrown.TweenBacScale();
 
+            ManaPlayer.SeleTra = ManaPlayer.PlayerBlond;
             ManaPlayer.SelePlayer = "PlayerBlond";
-            ManaPlayer.SelePlayerTra = ManaPlayer.PlayerBlond;
         }
         else if (eventData.rawPointerPress.name == "PlayerBk3")
         {
@@ -227,10 +229,6 @@ public class Tutorial : Regist, IPointerClickHandler
             offset.x = -offset.x;
             offset.y = 0;
 
-            //ManaReso.Get("PlayerBk1").GetMove2D().Pause();
-            //ManaReso.Get("PlayerBk2").GetMove2D().Pause();
-            //ManaReso.Get("PlayerBk3").GetMove2D().Pause();
-
             ManaReso.Get("PlayerBk1").MoveOffset2D(offset, 1f, false, Curve.EaseOutQuad);
             ManaReso.Get("PlayerBk2").MoveOffset2D(offset, 1f, false, Curve.EaseOutQuad);
             ManaReso.Get("PlayerBk3").MoveOffset2D(offset, 1f, false, Curve.EaseOutQuad);
@@ -243,14 +241,14 @@ public class Tutorial : Regist, IPointerClickHandler
             ManaPlayer.PlayerBlond.TweenBacScale();
             ManaPlayer.PlayerBrown.TweenBacScale();
 
+            ManaPlayer.SeleTra = ManaPlayer.PlayerPink;
             ManaPlayer.SelePlayer = "PlayerPink";
-            ManaPlayer.SelePlayerTra = ManaPlayer.PlayerPink;
         }
         else if (eventData.rawPointerPress.name == "TutorialCollider")
         {
             if (ManaTutorial.TutorialIndexA == 4)
             {
-                ManaTutorial.EndStepA4();
+                ManaTutorial.EndA4();
             }
         }
     }

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

@@ -50,7 +50,7 @@ public class TweenSr : TweenRoot
 
                         if (AlphaOnly)
                         {
-                            ChildList[i].material.SetAlpha(selfColor.a * Target.color.a, "_Color");
+                            ChildList[i].material.SetAlpha("_Color", selfColor.a * Target.color.a);
                         }
                         else
                         {
@@ -106,7 +106,7 @@ public class TweenSr : TweenRoot
 
                         if (AlphaOnly)
                         {
-                            ChildList[i].material.SetAlpha(selfColor.a * Target.color.a, "_Color");
+                            ChildList[i].material.SetAlpha("_Color", selfColor.a * Target.color.a);
                         }
                         else
                         {
@@ -282,7 +282,7 @@ public class TweenSr : TweenRoot
 
                     if (AlphaOnly)
                     {
-                        ChildList[i].material.SetAlpha(selfColor.a * Target.color.a, "_Color");
+                        ChildList[i].material.SetAlpha("_Color", selfColor.a * Target.color.a);
                     }
                     else
                     {
@@ -331,7 +331,7 @@ public class TweenSr : TweenRoot
 
                     if (AlphaOnly)
                     {
-                        ChildList[i].material.SetAlpha(selfColor.a * Target.color.a, "_Color");
+                        ChildList[i].material.SetAlpha("_Color", selfColor.a * Target.color.a);
                     }
                     else
                     {

+ 6 - 9
Assets/Script/Tool/Auxiliary.cs

@@ -93,15 +93,6 @@ public class Auxiliary : Regist
 
     public override void RegistImmed()
     {
-        if (RegistFlag)
-        {
-            return;
-        }
-        else
-        {
-            RegistFlag = true;
-        }
-
         enabled = true;
     }
 
@@ -116,6 +107,12 @@ public class Auxiliary : Regist
     {
         #region 调试
 
+        if (Input.GetKeyDown(KeyCode.Escape))
+        {
+            Debug.Log(Initializer.Complete + " " + ManaServer.Complete + " " + ManaCenter.Complete);
+            ManaDebug.Log(Initializer.Complete + " " + ManaServer.Complete + " " + ManaCenter.Complete);
+        }
+
         if (Input.GetKeyDown(KeyCode.Z))
         {
             

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

@@ -250,7 +250,7 @@ public class Bundle : MonoBehaviour
             //    ManaReso.AddAsyncPlayer(ManaData.GetPlayerString("Player"));
             //}
 
-            ManaReso.AddAsyncLoad("Flower", 9, Folder.Scene, ObjType.Flower, false, false, null, typeof(Flower));
+            ManaReso.AddAsyncLoad("Flower", 9, Folder.Scene, ObjType.Flower);
 
             ManaReso.AddAsyncLoad("Page", 2, Folder.Scene, ObjType.Page);
             ManaReso.AddAsyncLoad("Garden", 1, Folder.Scene, ObjType.Garden);

+ 0 - 9
Assets/Script/Tool/SceneMask.cs

@@ -14,15 +14,6 @@ public class SceneMask : Regist
 
     public override void RegistImmed()
     {
-        if (RegistFlag)
-        {
-            return;
-        }
-        else
-        {
-            RegistFlag = true;
-        }
-
         enabled = true;
         Material = GetComponent<SpriteRenderer>().material;
         BoxCollider = ManaReso.Get<BoxCollider2D>("TutorialCollider");

+ 0 - 9
Assets/Script/Tool/UI/HudText.cs

@@ -30,15 +30,6 @@ public class HudText : Regist
 
     public override void RegistImmed()
     {
-        if (RegistFlag)
-        {
-            return;
-        }
-        else
-        {
-            RegistFlag = true;
-        }
-
         enabled = true;
     }
 

+ 1 - 1
Assets/Script/Tool/UI/ImagePlus.cs

@@ -40,7 +40,7 @@ public class ImagePlus : Image
             {
                 if (sprite == null)
                 {
-                    sprite = ManaReso.Load<Sprite>("Atlas", Folder.Atlas);
+                    sprite = ManaReso.LoadSprite("Atlas", Folder.Atlas);
                 }
             }
         }

+ 0 - 9
Assets/Script/Tool/UI/Toast.cs

@@ -32,15 +32,6 @@ public class Toast : Regist
 
     public override void RegistImmed()
     {
-        if (RegistFlag)
-        {
-            return;
-        }
-        else
-        {
-            RegistFlag = true;
-        }
-
         Text = GetComponentInChildren<Text>();
         Transform = transform;
 

+ 24 - 1
MyLovelyGarden.csproj

@@ -45,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" />
@@ -173,6 +174,29 @@
     <Compile Include="Assets\Resource\Effect\Cartoon FX\Scripts\CFX_LightIntensityFade.cs" />
     <Compile Include="Assets\Resource\Effect\Cartoon FX\Spawn System\CFX_SpawnSystem.cs" />
     <Compile Include="Assets\Resource\Plugins\ConsolePro\ConsoleProRemoteServer.cs" />
+    <Compile Include="Assets\Script\Extension\Extension.cs" />
+    <Compile Include="Assets\Script\Extension\ExtensionAlpha.cs" />
+    <Compile Include="Assets\Script\Extension\ExtensionAnim.cs" />
+    <Compile Include="Assets\Script\Extension\ExtensionBool.cs" />
+    <Compile Include="Assets\Script\Extension\ExtensionButton.cs" />
+    <Compile Include="Assets\Script\Extension\ExtensionChild.cs" />
+    <Compile Include="Assets\Script\Extension\ExtensionCollider.cs" />
+    <Compile Include="Assets\Script\Extension\ExtensionColor.cs" />
+    <Compile Include="Assets\Script\Extension\ExtensionComponent.cs" />
+    <Compile Include="Assets\Script\Extension\ExtensionDictionary.cs" />
+    <Compile Include="Assets\Script\Extension\ExtensionEqual.cs" />
+    <Compile Include="Assets\Script\Extension\ExtensionGameObject.cs" />
+    <Compile Include="Assets\Script\Extension\ExtensionImage.cs" />
+    <Compile Include="Assets\Script\Extension\ExtensionInt.cs" />
+    <Compile Include="Assets\Script\Extension\ExtensionList.cs" />
+    <Compile Include="Assets\Script\Extension\ExtensionMaterial.cs" />
+    <Compile Include="Assets\Script\Extension\ExtensionScrollRect.cs" />
+    <Compile Include="Assets\Script\Extension\ExtensionString.cs" />
+    <Compile Include="Assets\Script\Extension\ExtensionTransform.cs" />
+    <Compile Include="Assets\Script\Extension\ExtensionUnityAction.cs" />
+    <Compile Include="Assets\Script\Extension\ExtensionVector2.cs" />
+    <Compile Include="Assets\Script\Extension\ExtensionVector3.cs" />
+    <Compile Include="Assets\Script\Extension\MyData.cs" />
     <Compile Include="Assets\Script\Interface\Regist.cs" />
     <Compile Include="Assets\Script\Manage\Initializer.cs" />
     <Compile Include="Assets\Script\Manage\Main.cs" />
@@ -238,7 +262,6 @@
     <Compile Include="Assets\Script\Tool\DashGame\RSACryptoService.cs" />
     <Compile Include="Assets\Script\Tool\DashGame\URLRequest.cs" />
     <Compile Include="Assets\Script\Tool\DashGame\URLRequestData.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" />

+ 9 - 5
ToList.txt

@@ -1,10 +1,12 @@
 编存档 下载随机存档失败时就编一个存档
 
 
-注册Bug(开始的时候拔掉网线)
+注册Bug
 
 存档损坏Bug
 
+为什么GetDescription不能合并 为什么要用RegistName
+
 
 分享图片报错
 
@@ -18,15 +20,17 @@
 
 发布前把服务器中的存档清理一次
 
-蝴蝶蜜蜂是否和彩虹冲突
+分享的标题和文字在语言文档里
 
-红色小蝴蝶和教程B冲突了 自动解锁蜜蜂和蝴蝶会冲突
+红色小蝴蝶和教程B冲突了
 
 
 Hud换装
 
-释放掉不用的Bundle
+Auxiliary中的Shrink、Formular、Parse改到Extension中
 
-小游戏时间45
+Tween中的AddEventOneTime改到UnityAction的Extension中
+
+释放掉不用的Bundle
 
 PageView有点不合适