LiuQilin 8 anni fa
parent
commit
afc5115b8b
46 ha cambiato i file con 988 aggiunte e 1083 eliminazioni
  1. BIN
      .vs/MyLovelyGarden/v14/.suo
  2. BIN
      Assets/Resource/Animations/ElfFly.anim
  3. BIN
      Assets/Resource/Animations/FlowerItemG.controller
  4. 0 8
      Assets/Resource/Animations/FlowerItemG.controller.meta
  5. BIN
      Assets/Resource/Animations/UIFlashLight.anim
  6. BIN
      Assets/Resource/Prefab/PrefabUI/Canvas.prefab
  7. 0 96
      Assets/Resource/Shader/Anim.shader
  8. 0 9
      Assets/Resource/Shader/Anim.shader.meta
  9. BIN
      Assets/Resource/Shader/AnimMat.mat
  10. 0 8
      Assets/Resource/Shader/AnimMat.mat.meta
  11. 1 1
      Assets/Resource/Shader/Discard.shader
  12. 30 17
      Assets/Resource/Shader/Gray.shader
  13. BIN
      Assets/Resource/Shader/GrayMat.mat
  14. 0 105
      Assets/Resource/Shader/HighLight.shader
  15. 0 9
      Assets/Resource/Shader/HighLight.shader.meta
  16. BIN
      Assets/Resource/Shader/HighLightMat.mat
  17. 0 8
      Assets/Resource/Shader/HighLightMat.mat.meta
  18. 142 144
      Assets/Resource/Shader/Mask.shader
  19. 131 130
      Assets/Resource/Shader/UIMask.shader
  20. 3 3
      Assets/Resource/XML/PlayerConfig.xml
  21. 0 14
      Assets/Script/Interface/AnimationReceiver.cs
  22. 98 163
      Assets/Script/Manage/ManaAchieve.cs
  23. 24 12
      Assets/Script/Manage/ManaData.cs
  24. 11 23
      Assets/Script/Manage/ManaGarden.cs
  25. 12 1
      Assets/Script/Manage/ManaLan.cs
  26. 9 9
      Assets/Script/Manage/ManaMiniGame.cs
  27. 16 5
      Assets/Script/Manage/ManaReso.cs
  28. 6 4
      Assets/Script/Manage/ManaServer.cs
  29. 1 1
      Assets/Script/Manage/ManaSign.cs
  30. 5 5
      Assets/Script/Manage/ManaUI.cs
  31. 7 7
      Assets/Script/Object/Drop.cs
  32. 29 0
      Assets/Script/Object/Elf.cs
  33. 2 2
      Assets/Script/Object/Elf.cs.meta
  34. 96 78
      Assets/Script/Object/Flower.cs
  35. 17 110
      Assets/Script/Object/Garden.cs
  36. 20 10
      Assets/Script/Object/Skill/Ability.cs
  37. 2 2
      Assets/Script/Object/Skill/BigSkill.cs
  38. 6 6
      Assets/Script/Object/Skill/Pack.cs
  39. 10 10
      Assets/Script/Object/Skill/Skill.cs
  40. 2 38
      Assets/Script/Object/Skill/SkillRoot.cs
  41. 2 3
      Assets/Script/Object/Slot.cs
  42. 263 3
      Assets/Script/Tool/Auxiliary.cs
  43. 2 2
      Assets/Script/Tool/DashGame/Language.cs
  44. 12 22
      Assets/Script/Tool/Data.cs
  45. 16 13
      MyLovelyGarden.sln
  46. 13 2
      ToList.txt

BIN
.vs/MyLovelyGarden/v14/.suo


BIN
Assets/Resource/Animations/ElfFly.anim


BIN
Assets/Resource/Animations/FlowerItemG.controller


+ 0 - 8
Assets/Resource/Animations/FlowerItemG.controller.meta

@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: 58c3cadb02dbc774ca98afda8ed7b494
-timeCreated: 1491010681
-licenseType: Pro
-NativeFormatImporter:
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

BIN
Assets/Resource/Animations/UIFlashLight.anim


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


+ 0 - 96
Assets/Resource/Shader/Anim.shader

@@ -1,96 +0,0 @@
-Shader "DashGame/Anim"
-{
-	Properties
-	{
-		[PerRendererData] _MainTex("Sprite Texture", 2D) = "white" {}
-		_Color("Tint", Color) = (1,0,0,1)
-		[MaterialToggle] PixelSnap("Pixel snap", Float) = 0
-	}
-
-		SubShader
-	{
-		Tags
-	{
-		"Queue" = "Transparent"
-		"IgnoreProjector" = "True"
-		"RenderType" = "Transparent"
-		"PreviewType" = "Plane"
-		"CanUseSpriteAtlas" = "True"
-	}
-
-		Cull Off
-		Lighting Off
-		ZWrite Off
-
-		Pass
-	{
-		Blend SrcAlpha OneMinusSrcAlpha
-
-		CGPROGRAM
-
-#pragma vertex vert
-#pragma fragment frag
-
-#pragma target 2.0
-
-#pragma multi_compile _ PIXELSNAP_ON
-#pragma multi_compile _ ETC1_EXTERNAL_ALPHA
-
-#include "UnityCG.cginc"
-
-	struct appdata_t
-	{
-		float4 vertex   : POSITION;
-		float4 color    : COLOR;
-		float2 texcoord : TEXCOORD0;
-	};
-
-	struct v2f
-	{
-		fixed4 color : COLOR;
-		float4 vertex   : SV_POSITION;
-		float2 texcoord  : TEXCOORD0;
-	};
-
-	fixed4 _Color;
-
-	v2f vert(appdata_t IN)
-	{
-		v2f OUT;
-
-		OUT.vertex = UnityObjectToClipPos(IN.vertex);
-		OUT.texcoord = IN.texcoord;
-		OUT.color = IN.color * _Color;
-
-		return OUT;
-	}
-
-	sampler2D _MainTex;
-
-	float4 SampleSpriteTexture(float2 uv)
-	{
-		float4 color = tex2D(_MainTex, uv);
-
-		return color;
-	}
-
-	fixed4 frag(v2f IN) : SV_Target
-	{
-		float4 c = SampleSpriteTexture(IN.texcoord);
-
-		if (c.r >= 200/255.0 && c.g >= 200/255.0 && c.b >= 200/255.0)
-		{
-			c.rgb = _Color.rgb;
-		}
-
-		/*if (c.r == c.g && c.r == c.b && c.g == c.b)
-		{
-			c.rgb = _Color.rgb;
-		}*/
-
-			return c;
-		}
-			ENDCG
-		}
-	}
-}

+ 0 - 9
Assets/Resource/Shader/Anim.shader.meta

@@ -1,9 +0,0 @@
-fileFormatVersion: 2
-guid: 947abbfbb5241b34998377d6ebd9d9b1
-timeCreated: 1491362677
-licenseType: Pro
-ShaderImporter:
-  defaultTextures: []
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

BIN
Assets/Resource/Shader/AnimMat.mat


+ 0 - 8
Assets/Resource/Shader/AnimMat.mat.meta

@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: 252cb69a6f7247c419c0a8d07215cab1
-timeCreated: 1491362986
-licenseType: Pro
-NativeFormatImporter:
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 1 - 1
Assets/Resource/Shader/Discard.shader

@@ -45,4 +45,4 @@
 			ENDCG
 		}
 	}
-}
+}

+ 30 - 17
Assets/Resource/Shader/Gray.shader

@@ -4,12 +4,19 @@
 	{
 		_MainTex ("Texture", 2D) = "white" {}
 
-		_StencilComp("Stencil Comparison", Float) = 8
+		_ColorMask("Color Mask", Float) = 15
+		_ColorMask("Color Mask", Float) = 15
+		_ColorMask("Color Mask", Float) = 15
+
 		_Stencil("Stencil ID", Float) = 0
 		_StencilOp("Stencil Operation", Float) = 0
-		_StencilWriteMask("Stencil Write Mask", Float) = 255
+		_StencilComp("Stencil Comparison", Float) = 8
 		_StencilReadMask("Stencil Read Mask", Float) = 255
-		_ColorMask("Color Mask", Float) = 15
+		_StencilWriteMask("Stencil Write Mask", Float) = 255
+
+		_GrayScaleX("GrayScaleX", range(0,1)) = 0.299
+		_GrayScaleY("GrayScaleY", range(0,1)) = 0.587
+		_GrayScaleZ("GrayScaleZ", range(0,1)) = 0.114
 
 		[Toggle(UNITY_UI_ALPHACLIP)] _UseUIAlphaClip("Use Alpha Clip", Float) = 0
 	}
@@ -19,27 +26,28 @@
 		Tags
 		{
 			"Queue" = "Transparent"
-			"IgnoreProjector" = "True"
 			"RenderType" = "Transparent"
 			"PreviewType" = "Plane"
+			"IgnoreProjector" = "True"
 			"CanUseSpriteAtlas" = "True"
 		}
 
-			Stencil
+		Stencil
 		{
 			Ref[_Stencil]
-			Comp[_StencilComp]
 			Pass[_StencilOp]
+			Comp[_StencilComp]
 			ReadMask[_StencilReadMask]
 			WriteMask[_StencilWriteMask]
 		}
 
-			Cull Off
-			Lighting Off
-			ZWrite Off
-			ZTest[unity_GUIZTestMode]
-			Blend SrcAlpha OneMinusSrcAlpha
-			ColorMask[_ColorMask]
+		Cull Off
+		ZWrite Off
+		Lighting Off
+		Blend SrcAlpha OneMinusSrcAlpha
+
+		ZTest[unity_GUIZTestMode]
+		ColorMask[_ColorMask]
 
 		Pass
 		{
@@ -68,18 +76,22 @@
 				float4 worldPosition : TEXCOORD1;
 			};
 
-			sampler2D _MainTex;
-			float4 _MainTex_ST;
+			float _GrayScaleX;
+			float _GrayScaleY;
+			float _GrayScaleZ;
 			float4 _ClipRect;
 
+			float4 _MainTex_ST;
+			sampler2D _MainTex;
+			
 			v2f vert (appdata v)
 			{
 				v2f o;
 
-				o.worldPosition = v.vertex;
-				o.vertex = UnityObjectToClipPos(v.vertex);
 				o.uv = TRANSFORM_TEX(v.uv, _MainTex);
 				o.color = v.color;
+				o.vertex = UnityObjectToClipPos(v.vertex);
+				o.worldPosition = v.vertex;
 
 				return o;
 			}
@@ -88,9 +100,10 @@
 			{
 				fixed4 col = tex2D(_MainTex, i.uv);
 
-				fixed gray = dot(col.rgb, fixed3(0.299, 0.587, 0.114));
+				fixed gray = dot(col.rgb, fixed3(_GrayScaleX, _GrayScaleY, _GrayScaleZ));
 
 				col.rgb = fixed3(gray, gray, gray);
+
 				col.a *= i.color.a; //CanvasGroup
 
 				col.a *= UnityGet2DClipping(i.worldPosition.xy, _ClipRect); //RectMask

BIN
Assets/Resource/Shader/GrayMat.mat


+ 0 - 105
Assets/Resource/Shader/HighLight.shader

@@ -1,105 +0,0 @@
-Shader "DashGame/HighLight"
-{
-	Properties
-	{
-		[PerRendererData] _MainTex("Sprite Texture", 2D) = "white" {}
-		_Scale("Scale", float) = 0.02
-		_Color("Tint", Color) = (1,1,1,1)
-		[MaterialToggle] PixelSnap("Pixel snap", Float) = 0
-	}
-
-	SubShader
-	{
-		Tags
-		{
-			"Queue" = "Transparent"
-			"IgnoreProjector" = "True"
-			"RenderType" = "Transparent"
-			"PreviewType" = "Plane"
-			"CanUseSpriteAtlas" = "True"
-		}
-
-		Cull Off
-		Lighting Off
-		ZWrite Off
-
-		Pass
-		{
-			Blend SrcAlpha OneMinusSrcAlpha
-
-			CGPROGRAM
-				
-			#pragma vertex vert
-			#pragma fragment frag
-				
-			#pragma target 2.0
-				
-			#pragma multi_compile _ PIXELSNAP_ON
-			#pragma multi_compile _ ETC1_EXTERNAL_ALPHA
-				
-			#include "UnityCG.cginc"
-
-			struct appdata_t
-			{
-				float4 vertex   : POSITION;
-				float4 color    : COLOR;
-				float2 texcoord : TEXCOORD0;
-			};
-
-			struct v2f
-			{
-				fixed4 color : COLOR;
-				float4 vertex   : SV_POSITION;
-				float2 texcoord  : TEXCOORD0;
-			};
-
-			float _Scale;
-			fixed4 _Color;
-
-			v2f vert(appdata_t IN)
-			{
-				v2f OUT;
-
-				OUT.vertex = UnityObjectToClipPos(IN.vertex);
-				OUT.texcoord = IN.texcoord;
-				OUT.color = IN.color * _Color;
-
-				return OUT;
-			}
-
-			sampler2D _MainTex;
-
-			fixed4 SampleSpriteTexture(float2 uv)
-			{
-				fixed4 color = tex2D(_MainTex, uv);
-
-				return color;
-			}
-
-			fixed4 frag(v2f IN) : SV_Target
-			{
-				fixed4 c = SampleSpriteTexture(IN.texcoord) * IN.color;
-
-				if (c.a == 0) 
-				{
-					fixed4 c1 = SampleSpriteTexture(IN.texcoord + float2(0, _Scale));
-					fixed4 c2 = SampleSpriteTexture(IN.texcoord + float2(_Scale, 0));
-					fixed4 c3 = SampleSpriteTexture(IN.texcoord + float2(0, -_Scale));
-					fixed4 c4 = SampleSpriteTexture(IN.texcoord + float2(-_Scale, 0));
-
-					if (c1.a > 0 || c2.a > 0 || c3.a > 0 || c4.a > 0)
-					{
-						c.rgba = fixed4(1,0,0,1);
-					}
-				}
-				else if (c.a < 1)
-				{
-					c.rgba = fixed4(1, 0, 0, 1);
-				}
-
-				return c;
-			}
-			ENDCG
-		}
-	}
-}

+ 0 - 9
Assets/Resource/Shader/HighLight.shader.meta

@@ -1,9 +0,0 @@
-fileFormatVersion: 2
-guid: 0328acfec1a1ba74cbfd90fb39cd5f70
-timeCreated: 1490605002
-licenseType: Pro
-ShaderImporter:
-  defaultTextures: []
-  userData: 
-  assetBundleName: shader
-  assetBundleVariant: 

BIN
Assets/Resource/Shader/HighLightMat.mat


+ 0 - 8
Assets/Resource/Shader/HighLightMat.mat.meta

@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: 8c1d308a23b4ae343b174be6509cc041
-timeCreated: 1490605040
-licenseType: Pro
-NativeFormatImporter:
-  userData: 
-  assetBundleName: shader
-  assetBundleVariant: 

+ 142 - 144
Assets/Resource/Shader/Mask.shader

@@ -2,177 +2,175 @@
 {
 	Properties
 	{
-		[PerRendererData] _MainTex("Sprite Texture", 2D) = "white" {}
 		_Color("Tint", Color) = (1,1,1,1)
+
 		[MaterialToggle] PixelSnap("Pixel snap", Float) = 0
+		[PerRendererData] _MainTex("Sprite Texture", 2D) = "white" {}
 	}
 
-		SubShader
+	SubShader
 	{
 		Tags
-	{
-		"Queue" = "Transparent"
-		"IgnoreProjector" = "True"
-		"RenderType" = "Transparent"
-		"PreviewType" = "Plane"
-		"CanUseSpriteAtlas" = "True"
-	}
+		{
+			"Queue" = "Transparent"
+			"RenderType" = "Transparent"
+			"PreviewType" = "Plane"
+			"IgnoreProjector" = "True"
+			"CanUseSpriteAtlas" = "True"
+		}
 
 		Cull Off
-		Lighting Off
 		ZWrite Off
+		Lighting Off
 
 		Pass
-	{
-		Blend SrcAlpha OneMinusSrcAlpha
-
-		CGPROGRAM
-
-#pragma vertex vert
-#pragma fragment frag
-
-#pragma multi_compile _ PIXELSNAP_ON
-#pragma multi_compile _ ETC1_EXTERNAL_ALPHA
-
-#include "UnityCG.cginc"
-
-	struct appdata_t
-	{
-		float4 vertex   : POSITION;
-		float4 color    : COLOR;
-		float2 texcoord : TEXCOORD0;
-	};
-
-	struct v2f
-	{
-		fixed4 color : COLOR;
-		float4 vertex   : SV_POSITION;
-		float4 screenPos   : TEXCOORD1;
-		float2 texcoord  : TEXCOORD0;
-	};
-
-	float _Angle;
-	float _RadiusX;
-	float _RadiusY;
-	float2 _Center;
-	fixed4 _Color;
-
-	v2f vert(appdata_t IN)
-	{
-		v2f OUT;
-
-		OUT.vertex = UnityObjectToClipPos(IN.vertex);
-		OUT.screenPos = ComputeScreenPos(OUT.vertex);
-		OUT.texcoord = IN.texcoord;
-		OUT.color = IN.color * _Color;
-
-		return OUT;
-	}
-
-	sampler2D _MainTex;
-
-	fixed4 SampleSpriteTexture(float2 uv)
-	{
-		fixed4 color = tex2D(_MainTex, uv);
-
-		return color;
-	}
-
-	fixed4 frag(v2f i) : SV_Target
-	{
-		fixed4 col = SampleSpriteTexture(i.texcoord) * i.color;
-
-	//_Center = float2(0.5,0.5);
-	_Angle = _RadiusY / 4;
-	//_RadiusX = 0.2;
-	//_RadiusY = 0.2;
-
-	float x = i.screenPos.x - _Center.x;
-	float y = i.screenPos.y - _Center.y;
-
-	if (abs(x) < _RadiusX && abs(y) < _RadiusY)
-	{
-		float2 ulo = _Center + float2(-_RadiusX, _RadiusY);
-		float2 uli = ulo + float2(_Angle, -_Angle / (_ScreenParams.y / _ScreenParams.x));
-
-		float2 uro = _Center + float2(_RadiusX, _RadiusY);
-		float2 uri = uro + float2(-_Angle, -_Angle / (_ScreenParams.y / _ScreenParams.x));
+		{
+			Blend SrcAlpha OneMinusSrcAlpha
 
-		float2 lro = _Center + float2(_RadiusX, -_RadiusY);
-		float2 lri = lro + float2(-_Angle, _Angle / (_ScreenParams.y / _ScreenParams.x));
+			CGPROGRAM
 
-		float2 llo = _Center + float2(-_RadiusX, -_RadiusY);
-		float2 lli = llo + float2(_Angle, _Angle / (_ScreenParams.y / _ScreenParams.x));
+			#pragma vertex vert
+			#pragma fragment frag
 
-		float urox = uro.x - i.screenPos.x;
-		float urix = i.screenPos.x - uri.x;
-		float uroy = uro.y - i.screenPos.y;
-		float uriy = i.screenPos.y - uri.y;
+			#pragma multi_compile _ PIXELSNAP_ON
+			#pragma multi_compile _ ETC1_EXTERNAL_ALPHA
 
-		float ulox = i.screenPos.x - ulo.x;
-		float ulix = uli.x - i.screenPos.x;
-		float uloy = ulo.y - i.screenPos.y;
-		float uliy = i.screenPos.y - uli.y;
+			#include "UnityCG.cginc"
 
-		float lrox = lro.x - i.screenPos.x;
-		float lrix = i.screenPos.x - lri.x;
-		float lroy = i.screenPos.y - lro.y;
-		float lriy = lri.y - i.screenPos.y;
+			struct appdata_t
+			{
+				float4 color    : COLOR;
+				float4 vertex   : POSITION;
+				float2 texcoord : TEXCOORD0;
+			};
 
-		float llox = i.screenPos.x - llo.x;
-		float llix = lli.x - i.screenPos.x;
-		float lloy = i.screenPos.y - llo.y;
-		float lliy = lli.y - i.screenPos.y;
+			struct v2f
+			{
+				fixed4 color : COLOR;
+				float4 vertex   : SV_POSITION;
+				float2 texcoord  : TEXCOORD0;
+				float4 screenPos   : TEXCOORD1;
+			};
+
+			float _Angle;
+			float _RadiusX;
+			float _RadiusY;
+			float2 _Center;
+			fixed4 _Color;
+			sampler2D _MainTex;
+			
+			v2f vert(appdata_t IN)
+			{
+				v2f OUT;
 
-		if (ulox > 0 && ulix  > 0 && uloy > 0 && uliy > 0)
-		{
-			float2 vec = uli - i.screenPos;
-			vec.y *= _ScreenParams.y / _ScreenParams.x;
+				OUT.color = IN.color * _Color;
+				OUT.vertex = UnityObjectToClipPos(IN.vertex);
+				OUT.texcoord = IN.texcoord;
+				OUT.screenPos = ComputeScreenPos(OUT.vertex);
 
-			if (length(vec) < _Angle)
-			{
-				col.a = 0;
+				return OUT;
 			}
-		}
-		else if (urox > 0 && urix  > 0 && uroy > 0 && uriy > 0)
-		{
-			float2 vec = uri - i.screenPos;
-			vec.y *= _ScreenParams.y / _ScreenParams.x;
 
-			if (length(vec) < _Angle)
-			{
-				col.a = 0;
-			}
-		}
-		else if (lrox > 0 && lrix > 0 && lroy > 0 && lriy > 0)
-		{
-			float2 vec = lri - i.screenPos;
-			vec.y *= _ScreenParams.y / _ScreenParams.x;
 
-			if (length(vec) < _Angle)
+			fixed4 SampleSpriteTexture(float2 uv)
 			{
-				col.a = 0;
+				fixed4 color = tex2D(_MainTex, uv);
+
+				return color;
 			}
-		}
-		else if (llox > 0 && llix  > 0 && lloy > 0 && lliy > 0)
-		{
-			float2 vec = lli - i.screenPos;
-			vec.y *= _ScreenParams.y / _ScreenParams.x;
 
-			if (length(vec) < _Angle)
+			fixed4 frag(v2f i) : SV_Target
 			{
-				col.a = 0;
+				fixed4 col = SampleSpriteTexture(i.texcoord) * i.color;
+
+				_Angle = _RadiusY / 4;
+
+				float x = i.screenPos.x - _Center.x;
+				float y = i.screenPos.y - _Center.y;
+
+				if (abs(x) < _RadiusX && abs(y) < _RadiusY)
+				{
+					float2 ulo = _Center + float2(-_RadiusX, _RadiusY);
+					float2 uli = ulo + float2(_Angle, -_Angle / (_ScreenParams.y / _ScreenParams.x));
+
+					float2 uro = _Center + float2(_RadiusX, _RadiusY);
+					float2 uri = uro + float2(-_Angle, -_Angle / (_ScreenParams.y / _ScreenParams.x));
+
+					float2 lro = _Center + float2(_RadiusX, -_RadiusY);
+					float2 lri = lro + float2(-_Angle, _Angle / (_ScreenParams.y / _ScreenParams.x));
+
+					float2 llo = _Center + float2(-_RadiusX, -_RadiusY);
+					float2 lli = llo + float2(_Angle, _Angle / (_ScreenParams.y / _ScreenParams.x));
+
+					float urox = uro.x - i.screenPos.x;
+					float urix = i.screenPos.x - uri.x;
+					float uroy = uro.y - i.screenPos.y;
+					float uriy = i.screenPos.y - uri.y;
+
+					float ulox = i.screenPos.x - ulo.x;
+					float ulix = uli.x - i.screenPos.x;
+					float uloy = ulo.y - i.screenPos.y;
+					float uliy = i.screenPos.y - uli.y;
+
+					float lrox = lro.x - i.screenPos.x;
+					float lrix = i.screenPos.x - lri.x;
+					float lroy = i.screenPos.y - lro.y;
+					float lriy = lri.y - i.screenPos.y;
+
+					float llox = i.screenPos.x - llo.x;
+					float llix = lli.x - i.screenPos.x;
+					float lloy = i.screenPos.y - llo.y;
+					float lliy = lli.y - i.screenPos.y;
+
+					if (ulox > 0 && ulix  > 0 && uloy > 0 && uliy > 0)
+					{
+						float2 vec = uli - i.screenPos;
+						vec.y *= _ScreenParams.y / _ScreenParams.x;
+
+						if (length(vec) < _Angle)
+						{
+							col.a = 0;
+						}
+					}
+					else if (urox > 0 && urix  > 0 && uroy > 0 && uriy > 0)
+					{
+						float2 vec = uri - i.screenPos;
+						vec.y *= _ScreenParams.y / _ScreenParams.x;
+
+						if (length(vec) < _Angle)
+						{
+							col.a = 0;
+						}
+					}
+					else if (lrox > 0 && lrix > 0 && lroy > 0 && lriy > 0)
+					{
+						float2 vec = lri - i.screenPos;
+						vec.y *= _ScreenParams.y / _ScreenParams.x;
+
+						if (length(vec) < _Angle)
+						{
+							col.a = 0;
+						}
+					}
+					else if (llox > 0 && llix  > 0 && lloy > 0 && lliy > 0)
+					{
+						float2 vec = lli - i.screenPos;
+						vec.y *= _ScreenParams.y / _ScreenParams.x;
+
+						if (length(vec) < _Angle)
+						{
+							col.a = 0;
+						}
+					}
+					else
+					{
+						col.a = 0;
+					}
+				}
+
+				return col;
 			}
+			ENDCG
 		}
-		else
-		{
-			col.a = 0;
-		}
-	}
-
-	return col;
-	}
-		ENDCG
-	}
 	}
 }

+ 131 - 130
Assets/Resource/Shader/UIMask.shader

@@ -5,162 +5,163 @@
 		_MainTex("Texture", 2D) = "white" {}
 	}
 
-		SubShader
+	SubShader
 	{
 		Tags
-	{
-		"Queue" = "Transparent"
-		"IgnoreProjector" = "True"
-		"RenderType" = "Transparent"
-		"PreviewType" = "Plane"
-		"CanUseSpriteAtlas" = "True"
-	}
+		{
+			"Queue" = "Transparent"
+			"RenderType" = "Transparent"
+			"PreviewType" = "Plane"
+			"IgnoreProjector" = "True"
+			"CanUseSpriteAtlas" = "True"
+		}
 
 		Cull Off
-		Lighting Off
 		ZWrite Off
-		ZTest[unity_GUIZTestMode]
-		Blend SrcAlpha OneMinusSrcAlpha
-
-		Pass
-	{
-		CGPROGRAM
-
-#pragma vertex vert
-#pragma fragment frag
-
-#include "UnityUI.cginc"
-#include "UnityCG.cginc"
-
-	struct appdata
-	{
-		float2 uv : TEXCOORD0;
-		float4 color : COLOR;
-		float4 vertex : POSITION;
-	};
-
-	struct v2f
-	{
-		float2 uv : TEXCOORD0;
-		float4 color : COLOR;
-		float4 vertex : SV_POSITION;
-		float4 screenPos : TEXCOORD1;
-	};
-
-	sampler2D _MainTex;
-	float4 _MainTex_ST;
-	float _Angle;
-	float _RadiusX;
-	float _RadiusY;
-	float2 _Center;
-
-	v2f vert(appdata v)
-	{
-		v2f o;
-
-		o.vertex = UnityObjectToClipPos(v.vertex);
-		o.screenPos = ComputeScreenPos(o.vertex);
-		o.uv = TRANSFORM_TEX(v.uv, _MainTex);
-		o.color = v.color;
-
-		return o;
-	}
-
-	fixed4 frag(v2f i) : SV_Target
-	{
-	//_Center = float2(0.5,0.5);
-	_Angle = _RadiusY/4;
-	//_RadiusX = 0.2;
-	//_RadiusY = 0.2;
+		Lighting Off
 
-		fixed4 col = tex2D(_MainTex, i.uv)*i.color;
+		Blend SrcAlpha OneMinusSrcAlpha
 
-		float x = i.screenPos.x - _Center.x;
-		float y = i.screenPos.y - _Center.y;
+		ZTest[unity_GUIZTestMode]
 
-		if (abs(x) < _RadiusX && abs(y) < _RadiusY)
+		Pass
 		{
-			float2 ulo = _Center + float2(-_RadiusX, _RadiusY);
-			float2 uli = ulo + float2(_Angle, -_Angle/(_ScreenParams.y/_ScreenParams.x));
-
-			float2 uro = _Center + float2(_RadiusX, _RadiusY);
-			float2 uri = uro + float2(-_Angle, -_Angle / (_ScreenParams.y / _ScreenParams.x));
+			CGPROGRAM
+			
+			#pragma vertex vert
+			#pragma fragment frag
 
-			float2 lro = _Center + float2(_RadiusX, -_RadiusY);
-			float2 lri = lro + float2(-_Angle, _Angle / (_ScreenParams.y / _ScreenParams.x));
+			#include "UnityUI.cginc"
+			#include "UnityCG.cginc"
 
-			float2 llo = _Center + float2(-_RadiusX, -_RadiusY);
-			float2 lli = llo + float2(_Angle, _Angle / (_ScreenParams.y / _ScreenParams.x));
+			struct appdata
+			{
+				float2 uv : TEXCOORD0;
+				float4 color : COLOR;
+				float4 vertex : POSITION;
+			};
 
-			float urox = uro.x - i.screenPos.x;
-			float urix = i.screenPos.x - uri.x;
-			float uroy = uro.y - i.screenPos.y;
-			float uriy = i.screenPos.y - uri.y;
+			struct v2f
+			{
+				float2 uv : TEXCOORD0;
+				float4 color : COLOR;
+				float4 vertex : SV_POSITION;
+				float4 screenPos : TEXCOORD1;
+			};
 
-			float ulox = i.screenPos.x - ulo.x;
-			float ulix = uli.x - i.screenPos.x;
-			float uloy = ulo.y - i.screenPos.y;
-			float uliy = i.screenPos.y - uli.y;
+			float _Angle;
+			float _RadiusX;
+			float _RadiusY;
+			float2 _Center;
 
-			float lrox = lro.x - i.screenPos.x;
-			float lrix = i.screenPos.x - lri.x;
-			float lroy = i.screenPos.y - lro.y;
-			float lriy = lri.y - i.screenPos.y;
+			float4 _MainTex_ST;
+			sampler2D _MainTex;
 
-			float llox = i.screenPos.x - llo.x;
-			float llix = lli.x - i.screenPos.x;
-			float lloy = i.screenPos.y - llo.y;
-			float lliy = lli.y - i.screenPos.y;
 
-			if(ulox > 0 && ulix  > 0 && uloy > 0 && uliy > 0)
+			v2f vert(appdata v)
 			{
-				float2 vec = uli - i.screenPos;
-				vec.y *= _ScreenParams.y / _ScreenParams.x;
+				v2f o;
 
-				if (length(vec) < _Angle)
-				{
-					col.a = 0;
-				}
-			}
-			else if(urox > 0 && urix  > 0 && uroy > 0 && uriy > 0)
-			{
-				float2 vec = uri - i.screenPos;
-				vec.y *= _ScreenParams.y / _ScreenParams.x;
+				o.uv = TRANSFORM_TEX(v.uv, _MainTex);
+				o.color = v.color;
+				o.vertex = UnityObjectToClipPos(v.vertex);
+				o.screenPos = ComputeScreenPos(o.vertex);
 
-				if (length(vec) < _Angle)
-				{
-					col.a = 0;
-				}
+				return o;
 			}
-			else if (lrox > 0 && lrix > 0 && lroy > 0 && lriy > 0)
-			{
-				float2 vec = lri - i.screenPos;
-				vec.y *= _ScreenParams.y / _ScreenParams.x;
 
-				if (length(vec) < _Angle)
-				{
-					col.a = 0;
-				}
-			}
-			else if (llox > 0 && llix  > 0 && lloy > 0 && lliy > 0)
+			fixed4 frag(v2f i) : SV_Target
 			{
-				float2 vec = lli - i.screenPos;
-				vec.y *= _ScreenParams.y / _ScreenParams.x;
+				_Angle = _RadiusY/4;
 
-				if (length(vec) < _Angle)
+				fixed4 col = tex2D(_MainTex, i.uv)*i.color;
+
+				float x = i.screenPos.x - _Center.x;
+				float y = i.screenPos.y - _Center.y;
+
+				if (abs(x) < _RadiusX && abs(y) < _RadiusY)
 				{
-					col.a = 0;
+					float2 ulo = _Center + float2(-_RadiusX, _RadiusY);
+					float2 uli = ulo + float2(_Angle, -_Angle/(_ScreenParams.y/_ScreenParams.x));
+
+					float2 uro = _Center + float2(_RadiusX, _RadiusY);
+					float2 uri = uro + float2(-_Angle, -_Angle / (_ScreenParams.y / _ScreenParams.x));
+
+					float2 lro = _Center + float2(_RadiusX, -_RadiusY);
+					float2 lri = lro + float2(-_Angle, _Angle / (_ScreenParams.y / _ScreenParams.x));
+
+					float2 llo = _Center + float2(-_RadiusX, -_RadiusY);
+					float2 lli = llo + float2(_Angle, _Angle / (_ScreenParams.y / _ScreenParams.x));
+
+					float urox = uro.x - i.screenPos.x;
+					float urix = i.screenPos.x - uri.x;
+					float uroy = uro.y - i.screenPos.y;
+					float uriy = i.screenPos.y - uri.y;
+
+					float ulox = i.screenPos.x - ulo.x;
+					float ulix = uli.x - i.screenPos.x;
+					float uloy = ulo.y - i.screenPos.y;
+					float uliy = i.screenPos.y - uli.y;
+
+					float lrox = lro.x - i.screenPos.x;
+					float lrix = i.screenPos.x - lri.x;
+					float lroy = i.screenPos.y - lro.y;
+					float lriy = lri.y - i.screenPos.y;
+
+					float llox = i.screenPos.x - llo.x;
+					float llix = lli.x - i.screenPos.x;
+					float lloy = i.screenPos.y - llo.y;
+					float lliy = lli.y - i.screenPos.y;
+
+					if(ulox > 0 && ulix  > 0 && uloy > 0 && uliy > 0)
+					{
+						float2 vec = uli - i.screenPos;
+						vec.y *= _ScreenParams.y / _ScreenParams.x;
+
+						if (length(vec) < _Angle)
+						{
+							col.a = 0;
+						}
+					}
+					else if(urox > 0 && urix  > 0 && uroy > 0 && uriy > 0)
+					{
+						float2 vec = uri - i.screenPos;
+						vec.y *= _ScreenParams.y / _ScreenParams.x;
+
+						if (length(vec) < _Angle)
+						{
+							col.a = 0;
+						}
+					}
+					else if (lrox > 0 && lrix > 0 && lroy > 0 && lriy > 0)
+					{
+						float2 vec = lri - i.screenPos;
+						vec.y *= _ScreenParams.y / _ScreenParams.x;
+
+						if (length(vec) < _Angle)
+						{
+							col.a = 0;
+						}
+					}
+					else if (llox > 0 && llix  > 0 && lloy > 0 && lliy > 0)
+					{
+						float2 vec = lli - i.screenPos;
+						vec.y *= _ScreenParams.y / _ScreenParams.x;
+
+						if (length(vec) < _Angle)
+						{
+							col.a = 0;
+						}
+					}
+					else
+					{
+						col.a = 0;
+					}
 				}
+
+				return col;
 			}
-			else
-			{
-				col.a = 0;
-			}
+			ENDCG
 		}
-
-		return col;
-	}
-		ENDCG
-	}
 	}
 }

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

@@ -1,5 +1,5 @@
 <PlayerConfig>
-  <Version value="92" />
+  <Version value="94" />
   <TutorialA value="0" />
   <TutorialB value="0" />
   <TutorialIndexA value="1" />
@@ -20,8 +20,8 @@
   <PlantList value =""/>
   <FlowerList value="1" />
   <AchieveList value="" />
-  <AchieveData AD="0" Skill="0" Sign="0" Share="0" MiniGame="0" FlowerCoin="0"/>
-  
+  <AchieveData AD="0" Skill="0" Sign="0" Share="0" MiniGame="0" FlowerCoin="0" TotalPerson="0"/>
+
   <SkillList>
     <Skill ID="Skill4" SkillType="Skill" ItemStatus="Lock" Level="0" CdTimer="0" EffectTimer="0" />
     <Skill ID="Skill5" SkillType="Skill" ItemStatus="Lock" Level="0" CdTimer="0" EffectTimer="0" />

+ 0 - 14
Assets/Script/Interface/AnimationReceiver.cs

@@ -1,14 +0,0 @@
-using UnityEngine;
-
-using System.Collections;
-using System.Collections.Generic;
-
-public class AnimationReceiver : MonoBehaviour
-{
-    public void SaveAnim()
-    {
-        GetComponentInParent<Flower>().ElfList.Remove(transform);
-
-        ManaReso.Save(transform.parent);
-    }
-}

+ 98 - 163
Assets/Script/Manage/ManaAchieve.cs

@@ -12,16 +12,19 @@ using Object = UnityEngine.Object;
 
 public enum AchieveType
 {
-    Elf,
-    AD,
-    Skill,
-    Sign,
-    Share,
-    Flower,
-    Person,
-    Garden,
+    TotalPerson,
+
+    ElfLevel,
+    GardenLevel,
+
+    AdAmt,
+    SkillAmt,
+    SignAmt,
+    ShareAmt,
+    FlowerAmt,
+    MiniGameAmt,
+
     TotalCoin,
-    MiniGame,
     FlowerCoin,
     CurrentCoin,
 }
@@ -30,57 +33,38 @@ public class Achieve
 {
     #region 变量
 
-    public string Desc
+    public string ID
     {
         get
         {
-            return Language.GetStr("AchieveDesc", ID);
+            return "Achieve" + ID_;
         }
     }
-    public string Name
+    public string Desc
     {
         get
         {
-            return Language.GetStr("AchieveName", ID);
+            return Language.GetStr("AchieveDesc", ID);
         }
     }
-
-    public int ID_;
-    public string ID
+    public string Name
     {
         get
         {
-            return "Achieve" + ID_;
-        }
-    }
-
-    public bool Regist
-    {
-        get { return Regist_; }
-        set
-        {
-            Regist_ = value;
-
-            if (Regist_)
-            {
-                AchieveItem = ManaReso.GetAchieveItem();
-
-                RegistValue();
-            }
+            return Language.GetStr("AchieveName", ID);
         }
     }
-    public bool Regist_;
-
-    public string Icon_;
     public Sprite Icon
     {
         get { return ManaReso.Load<Sprite>(Icon_, Folder.UI); }
     }
 
+    public int ID_;
+    public bool Available = true;
+    public string Icon_;
+
     public int Index;
     public int Parent;
-    public bool Valid;
-    public bool Finish;
     public bool Delete;
     public float Person;
     public float CoinPerson;
@@ -101,20 +85,18 @@ public class Achieve
 
     public Achieve(XmlAttributeCollection attribute)
     {
-        Valid = true;
-
         Icon_ = attribute[11].Value;
         Type = TypeParse(attribute[4].Value);
-        Value = double.Parse(attribute[5].Value);
-        Delete = BoolParse(attribute[7].Value);
-        Parent = ParentParse(attribute[6].Value);
+        Delete = Auxiliary.BoolParse(attribute[7].Value, false);
+        Parent = Auxiliary.IntParse(attribute[6].Value, -1);
 
         ID_ = int.Parse(attribute[0].Value);
         Index = int.Parse(attribute[1].Value);
+        Value = double.Parse(attribute[5].Value);
 
-        Person = AwardParse(attribute[10].Value);
-        CoinPerson = AwardParse(attribute[9].Value);
-        DiamondOnce = AwardParse(attribute[8].Value);
+        Person = Auxiliary.FloatParse(attribute[10].Value, 0);
+        CoinPerson = Auxiliary.FloatParse(attribute[9].Value, 0);
+        DiamondOnce = Auxiliary.FloatParse(attribute[8].Value, 0);
 
         ManaAchieve.AchieveDic.Add(ID_, this);
         
@@ -129,12 +111,13 @@ public class Achieve
     {
         ManaDebug.Log(string.Format("获得钻石<color=red>{0}</color> 参观人次+<color=red>{1}</color> 每人次金币+<color=red>{2}</color>", DiamondOnce, Person, CoinPerson));
 
-        Valid = false;
-
         ManaData.Diamond += DiamondOnce;
         ManaData.SkillPerson += Person;
         ManaData.SkillCoinPerson += CoinPerson;
-        ManaAchieve.DeleDic[Type] = null;
+
+        Available = false;
+
+        ManaAchieve.DeleDic[Type] -= UpdateValue;
 
         if (Delete)
         {
@@ -142,19 +125,20 @@ public class Achieve
             
             if (PostAchieveList.Count > 0)
             {
-                PostAchieveList[0].Regist = true;
-                
-                PostAchieveList.RemoveAt(0);
+                PostAchieveList[0].Regist();
             }
         }
         else
         {
-            UpdateStatus();
+            ToComplete();
         }
     }
 
-    public void RegistValue()
+
+    public void Regist()
     {
+        AchieveItem = ManaReso.GetAchieveItem();
+
         Dictionary<string, Transform> dic = new Dictionary<string, Transform>();
 
         Auxiliary.CompileDic(AchieveItem, dic);
@@ -168,7 +152,6 @@ public class Achieve
 
         ManaLan.Add(Tit, new LanStr("AchieveName", ID));
         ManaLan.Add(Lab, new LanStr("AchieveDesc", ID));
-        ManaAchieve.DeleDic[Type] += UpdateValue;
 
         Image.sprite = Icon;
         AchieveItem.SetSiblingIndex(Index - 1);
@@ -176,8 +159,16 @@ public class Achieve
         Button.onClick.RemoveAllListeners();
         Button.onClick.AddListener(GetAward);
 
-        UpdateValue();
-        UpdateStatus();
+        if (Available)
+        {
+            UpdateValue();
+            
+            ManaAchieve.DeleDic[Type] += UpdateValue;
+        }
+        else
+        {
+            ToComplete();       
+        }
     }
 
 
@@ -185,31 +176,31 @@ public class Achieve
     {
         double value;
 
-        if (Type == AchieveType.AD)
+        if (Type == AchieveType.AdAmt)
         {
             value = ManaData.AD;
         }
-        else if (Type == AchieveType.Skill)
+        else if (Type == AchieveType.SkillAmt)
         {
             value = ManaData.Skill;
         }
-        else if (Type == AchieveType.Sign)
+        else if (Type == AchieveType.SignAmt)
         {
             value = ManaData.SignAmt;
         }
-        else if (Type == AchieveType.Share)
+        else if (Type == AchieveType.ShareAmt)
         {
             value = ManaData.Share;
         }
-        else if (Type == AchieveType.Flower)
+        else if (Type == AchieveType.FlowerAmt)
         {
             value = ManaGarden.MyFlower;
         }
-        else if (Type == AchieveType.Person)
+        else if (Type == AchieveType.TotalPerson)
         {
-            value = ManaData.Person;
+            value = ManaData.TotalPerson;
         }
-        else if (Type == AchieveType.Elf)
+        else if (Type == AchieveType.ElfLevel)
         {
             value = ManaData.Elf;
         }
@@ -217,7 +208,7 @@ public class Achieve
         {
             value = ManaData.TotalCoin;
         }
-        else if (Type == AchieveType.MiniGame)
+        else if (Type == AchieveType.MiniGameAmt)
         {
             value = ManaData.MiniGameAmt;
         }
@@ -229,7 +220,7 @@ public class Achieve
         {
             value = ManaData.Coin;
         }
-        else if (Type == AchieveType.Garden)
+        else if (Type == AchieveType.GardenLevel)
         {
             value = ManaData.Level;
         }
@@ -238,51 +229,25 @@ public class Achieve
             throw new Exception();
         }
 
-        Slider.value = (float)(value / Value);
-
-        if (value >= Value)
-        {
-            Finish = true;
-        }
+        UpdateValue(value);
     }
 
     public void UpdateValue(double value)
     {
-        if (Valid == false)
-        {
-            return;
-        }
-
-        Slider.value = (float)(value/Value);
+        Slider.value = (float)(value / Value);
 
         if (value >= Value)
         {
-            Finish = true;
-
-            UpdateStatus();
-        }
-    }
-
-    public void UpdateStatus()
-    {
-        if (Finish == false)
-        {
-            StatusProcess();
+            ToAvailible();
         }
         else
         {
-            if (Valid)
-            {
-                StatusAvailible();
-            }
-            else
-            {
-                StausComplete();
-            }
+            ToProcess(value);
         }
     }
 
-    public void StatusProcess()
+
+    public void ToProcess(double value)
     {
         List<object> objList = new List<object>();
         
@@ -314,7 +279,7 @@ public class Achieve
         ManaLan.Add(BtnLab, objList.ToArray());
     }
 
-    public void StatusAvailible()
+    public void ToAvailible()
     {
         List<object> objList = new List<object>();
 
@@ -346,8 +311,10 @@ public class Achieve
         ManaLan.Add(BtnLab, objList.ToArray());
     }
 
-    public void StausComplete()
+    public void ToComplete()
     {
+        Slider.value = 1;
+
         Button.image.material = null;
         Button.interactable = false;
 
@@ -355,42 +322,13 @@ public class Achieve
     }
 
 
-    public int ParentParse(string str)
-    {
-        if (string.IsNullOrEmpty(str))
-        {
-            return -1;
-        }
-        else
-        {
-            return int.Parse(str);
-        }
-    }
-
-    public bool BoolParse(string str)
-    {
-        return Convert.ToBoolean(int.Parse(str));
-    }
-
-    public float AwardParse(string str)
-    {
-        if (string.IsNullOrEmpty(str))
-        {
-            return 0;
-        }
-        else
-        {
-            return float.Parse(str);
-        }
-    }
-
     public AchieveType TypeParse(string str)
     {
         int integer = int.Parse(str);
 
         if (integer == 1)
         {
-            return AchieveType.Garden;
+            return AchieveType.GardenLevel;
         }
         else if (integer == 2)
         {
@@ -402,35 +340,35 @@ public class Achieve
         }
         else if (integer == 4)
         {
-            return AchieveType.Elf;
+            return AchieveType.ElfLevel;
         }
         else if (integer == 5)
         {
-            return AchieveType.Flower;
+            return AchieveType.FlowerAmt;
         }
         else if (integer == 6)
         {
-            return AchieveType.Person;
+            return AchieveType.TotalPerson;
         }
         else if (integer == 7)
         {
-            return AchieveType.Skill;
+            return AchieveType.SkillAmt;
         }
         else if (integer == 8)
         {
-            return AchieveType.AD;
+            return AchieveType.AdAmt;
         }
         else if (integer == 9)
         {
-            return AchieveType.Sign;
+            return AchieveType.SignAmt;
         }
         else if (integer == 10)
         {
-            return AchieveType.Share;
+            return AchieveType.ShareAmt;
         }
         else if (integer == 11)
         {
-            return AchieveType.MiniGame;
+            return AchieveType.MiniGameAmt;
         }
         else if (integer == 12)
         {
@@ -453,11 +391,11 @@ public class ManaAchieve : Regist
     public static UnityAction<double> Sign;
     public static UnityAction<double> Share;
     public static UnityAction<double> Flower;
-    public static UnityAction<double> Person;
     public static UnityAction<double> Garden;
     public static UnityAction<double> TotalCoin;
     public static UnityAction<double> MiniGame;
     public static UnityAction<double> FlowerCoin;
+    public static UnityAction<double> TotalPerson;
     public static UnityAction<double> CurrentCoin;
 
     public static Dictionary<int, Achieve> AchieveDic = new Dictionary<int, Achieve>();
@@ -465,55 +403,52 @@ public class ManaAchieve : Regist
     
     #endregion
 
-    public override void Instantiate()
+    public override void RegistValueA()
     {
+        DeleDic.Add(AchieveType.ElfLevel, Elf);
+        DeleDic.Add(AchieveType.AdAmt, AD);
+        DeleDic.Add(AchieveType.SkillAmt, Skill);
+        DeleDic.Add(AchieveType.SignAmt, Sign);
+        DeleDic.Add(AchieveType.ShareAmt, Share);
+        DeleDic.Add(AchieveType.FlowerAmt, Flower);
+        DeleDic.Add(AchieveType.TotalPerson, TotalPerson);
+        DeleDic.Add(AchieveType.GardenLevel, Garden);
+        DeleDic.Add(AchieveType.TotalCoin, TotalCoin);
+        DeleDic.Add(AchieveType.MiniGameAmt, MiniGame);
+        DeleDic.Add(AchieveType.FlowerCoin, FlowerCoin);
+        DeleDic.Add(AchieveType.CurrentCoin, CurrentCoin);
+
+
         List<XmlAttributeCollection> attributeList = Data.GetAchieveConfig();
 
         for (int i = 0; i < attributeList.Count; i++)
         {
             new Achieve(attributeList[i]);
         }
-    }
 
-    public override void RegistValueA()
-    {
-        DeleDic.Add(AchieveType.Elf, Elf);
-        DeleDic.Add(AchieveType.AD, AD);
-        DeleDic.Add(AchieveType.Skill, Skill);
-        DeleDic.Add(AchieveType.Sign, Sign);
-        DeleDic.Add(AchieveType.Share, Share);
-        DeleDic.Add(AchieveType.Flower, Flower);
-        DeleDic.Add(AchieveType.Person, Person);
-        DeleDic.Add(AchieveType.Garden, Garden);
-        DeleDic.Add(AchieveType.TotalCoin, TotalCoin);
-        DeleDic.Add(AchieveType.MiniGame, MiniGame);
-        DeleDic.Add(AchieveType.FlowerCoin, FlowerCoin);
-        DeleDic.Add(AchieveType.CurrentCoin, CurrentCoin);
 
         List<int> achieveList = Data.GetAchieveList();
 
         for (int i = 0; i < achieveList.Count; i++)
         {
-            AchieveDic[achieveList[i]].Valid = false;
-            AchieveDic[achieveList[i]].Finish = true;
+            AchieveDic[achieveList[i]].Available = false;
         }
 
 
         foreach (var kv in AchieveDic)
         {
-            if (kv.Value.Valid)
+            if (kv.Value.Available)
             {
-                if (kv.Value.Parent == -1 || !AchieveDic[kv.Value.Parent].Valid)
+                if (kv.Value.Parent == -1 || !AchieveDic[kv.Value.Parent].Available)
                 {
-                    kv.Value.Regist = true;
+                    kv.Value.Regist();
                 }
             }
             else
             {
                 if (kv.Value.Delete == false)
                 {
-                    kv.Value.Regist = true;
-                    kv.Value.Slider.value = 1;
+                    kv.Value.Regist();
                 }
             }
         }

+ 24 - 12
Assets/Script/Manage/ManaData.cs

@@ -22,7 +22,7 @@ public class ManaData : Regist
         {
             Elf_ = value;
 
-            ManaAchieve.UpdateStatus(AchieveType.Elf, Elf_);
+            ManaAchieve.UpdateStatus(AchieveType.ElfLevel, Elf_);
         }
     }
     public static double AD
@@ -32,7 +32,7 @@ public class ManaData : Regist
         {
             AD_ = value;
 
-            ManaAchieve.UpdateStatus(AchieveType.AD, AD_);
+            ManaAchieve.UpdateStatus(AchieveType.AdAmt, AD_);
         }
     }
     public static double Skill
@@ -42,7 +42,7 @@ public class ManaData : Regist
         {
             Skill_ = value;
 
-            ManaAchieve.UpdateStatus(AchieveType.Skill, Skill_);
+            ManaAchieve.UpdateStatus(AchieveType.SkillAmt, Skill_);
         }
     }
     public static double SignAmt
@@ -52,7 +52,7 @@ public class ManaData : Regist
         {
             SignAmt_ = value;
 
-            ManaAchieve.UpdateStatus(AchieveType.Sign, SignAmt_);
+            ManaAchieve.UpdateStatus(AchieveType.SignAmt, SignAmt_);
         }
     }
     public static double Share
@@ -62,7 +62,7 @@ public class ManaData : Regist
         {
             Share_ = value;
 
-            ManaAchieve.UpdateStatus(AchieveType.Share, Share_);
+            ManaAchieve.UpdateStatus(AchieveType.ShareAmt, Share_);
         }
     }
     public static double TotalCoin
@@ -82,7 +82,7 @@ public class ManaData : Regist
         {
             MiniGameAmt_ = value;
 
-            ManaAchieve.UpdateStatus(AchieveType.MiniGame, MiniGameAmt_);
+            ManaAchieve.UpdateStatus(AchieveType.MiniGameAmt, MiniGameAmt_);
         }
     }
     public static double FlowerCoin
@@ -95,6 +95,16 @@ public class ManaData : Regist
             ManaAchieve.UpdateStatus(AchieveType.FlowerCoin, FlowerCoin_);
         }
     }
+    public static double TotalPerson
+    {
+        get { return TotalPerson_; }
+        set
+        {
+            TotalPerson_ = value;
+
+            ManaAchieve.UpdateStatus(AchieveType.TotalPerson, FlowerCoin_);
+        }
+    }
 
     private static double Elf_;
     private static double AD_;
@@ -104,6 +114,7 @@ public class ManaData : Regist
     private static double TotalCoin_;
     private static double MiniGameAmt_;
     private static double FlowerCoin_;
+    private static double TotalPerson_;
 
     #endregion
 
@@ -126,7 +137,7 @@ public class ManaData : Regist
 
             ManaDebug.Log(string.Format("已升级 花园等级 : <color=red>{0}</color>", Level_));
 
-            ManaAchieve.UpdateStatus(AchieveType.Garden, Level_);
+            ManaAchieve.UpdateStatus(AchieveType.GardenLevel, Level_);
 
             if (TabBtnValid == false)
             {
@@ -192,9 +203,7 @@ public class ManaData : Regist
         {
             Person_ = value;
 
-            ManaReso.SetText("F_PersonLab", Person_.ToString("0.0"));
-
-            ManaAchieve.UpdateStatus(AchieveType.Person, Person_);
+            ManaReso.SetText("F_PersonLab", Person_.ToString("0"));
         }
     }
     public static float CoinPerson
@@ -204,7 +213,7 @@ public class ManaData : Regist
         {
             CoinPerson_ = value;
 
-            ManaReso.SetText("F_CoinPersonLab", CoinPerson_.ToString("0.0"));
+            ManaReso.SetText("F_CoinPersonLab", CoinPerson_.ToString("0"));
         }
     }
     public static double Coin
@@ -375,6 +384,8 @@ public class ManaData : Regist
             NewPerson = Person * (1 + SkillPersonBuff) + SkillPerson;
             NewCoinPerson = CoinPerson + SkillCoinPerson;
 
+            TotalPerson += NewPerson;
+
             float temp = (NewPerson * NewCoinPerson * CircleTime) * (1 + SkillPlus);
 
             Coin += temp;
@@ -473,6 +484,7 @@ public class ManaData : Regist
         Share = dataList[3];
         MiniGameAmt = dataList[4];
         FlowerCoin = dataList[5];
+        TotalPerson = dataList[6];
 
         #endregion
     }
@@ -602,7 +614,7 @@ public class ManaData : Regist
             return true;
         }
 
-        amt = (long) amt;
+        amt = Auxiliary.ShrinkNumber(amt);
 
         if (current == Current.Free)
         {

+ 11 - 23
Assets/Script/Manage/ManaGarden.cs

@@ -34,7 +34,7 @@ public class ManaGarden : Regist
         {
             MyFlower_ = value;
 
-            ManaAchieve.UpdateStatus(AchieveType.Flower, MyFlower_);
+            ManaAchieve.UpdateStatus(AchieveType.FlowerAmt, MyFlower_);
 
             ManaReso.SetText("F_FlowerLab", string.Format("{0}", MyFlower));
             ManaReso.SetText("G_CollectLab1", string.Format("{0}/{1}", MyFlower, TotalFlower));
@@ -95,7 +95,7 @@ public class ManaGarden : Regist
 
     public static List<Slot> SlotList = new List<Slot>();
     public static List<Slot> PlantList = new List<Slot>();
-    public static List<ObjType> AnimList = new List<ObjType>();
+    public static List<ObjType> ElfList = new List<ObjType>();
 
     public static Dictionary<int, FlowerInfo> FlowerInfoDic = new Dictionary<int, FlowerInfo>();
 
@@ -122,7 +122,7 @@ public class ManaGarden : Regist
                 TotalFlowerRegu++;
             }
 
-            FlowerInfoDic.Add(flowerInfo.ID, flowerInfo);
+            FlowerInfoDic.Add(flowerInfo.ID_, flowerInfo);
         }
 
         #endregion
@@ -181,28 +181,16 @@ public class ManaGarden : Regist
     {
         if (ManaTutorial.TutorialA)
         {
-            TutorialFixedUpdate();
+            return;
         }
-        else
-        {
-            RegularFixedUpdate();
-        }
-    }
 
-    private void TutorialFixedUpdate()
-    {
-
-    }
-
-    private void RegularFixedUpdate()
-    {
-        AnimThread();
+        ElfThread();
 
         AwardThread();
     }
 
 
-    public void AnimThread()
+    public void ElfThread()
     {
         AnimTimer -= Time.fixedDeltaTime;
         
@@ -210,9 +198,9 @@ public class ManaGarden : Regist
         {
             AnimTimer = Random.Range(0f, 30f);
             
-            if (AnimList.Count > 0 && PlantList.Count > 0)
+            if (ElfList.Count > 0 && PlantList.Count > 0)
             {
-                PlantList.Random().Flower.PlayAnim(AnimList.Random());
+                PlantList.Random().Flower.PlayAnim(ElfList.Random());
             }
         }
     }
@@ -271,13 +259,13 @@ public class ManaGarden : Regist
         ManaReso.Get("H_FlowerCard").TweenForCG();
 
 
-        ManaLan.Add(ManaReso.Get<Text>("H_Lab"), new LanStr("FlowerName", flowerInfo._Name));
+        ManaLan.Add(ManaReso.Get<Text>("H_Lab"), new LanStr("FlowerName", flowerInfo.ID));
 
         Image image = ManaReso.Get<Image>("H_Icon2");
 
-        image.sprite = flowerInfo.Sprite;
+        image.sprite = flowerInfo.Icon;
 
-        Vector2 newSize = flowerInfo.Sprite.rect.size;
+        Vector2 newSize = flowerInfo.Icon.rect.size;
         newSize.x *= 0.65f;
         newSize.y *= 0.65f;
 

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

@@ -4,6 +4,13 @@ using UnityEngine.UI;
 using System.Collections;
 using System.Collections.Generic;
 
+public enum Lan
+{
+    English,
+    ChineseSimplified,
+}
+
+
 public class LanStr
 {
     public string ID;
@@ -25,6 +32,8 @@ public class ManaLan : Regist
 {
     #region 变量
 
+    public static Lan CurrentLan = Lan.ChineseSimplified;
+
     public static Dictionary<Text, object[]> TextDic = new Dictionary<Text, object[]>();
     public static Dictionary<TextMesh, object[]> TextMeshDic = new Dictionary<TextMesh, object[]>();
 
@@ -64,8 +73,10 @@ public class ManaLan : Regist
     }
 
 
-    public static void SwitchLanguage(string lan)
+    public static void SwitchLanguage(Lan lan)
     {
+        CurrentLan = lan;
+
         Language.SwitchLanguage(lan);
 
         foreach (var kv in TextDic)

+ 9 - 9
Assets/Script/Manage/ManaMiniGame.cs

@@ -146,14 +146,14 @@ public class Award
 
             FlowerInfo flowerInfo = ManaGarden.FlowerInfoDic[1];
 
-            Vector2 newSize = flowerInfo.Sprite.rect.size;
+            Vector2 newSize = flowerInfo.Icon.rect.size;
             newSize.x *= 0.2f;
             newSize.y *= 0.2f;
 
-            ManaReso.Get<Image>("Da_FlowerIcon").sprite = flowerInfo.Sprite;
+            ManaReso.Get<Image>("Da_FlowerIcon").sprite = flowerInfo.Icon;
             ManaReso.Get<Image>("Da_FlowerIcon").rectTransform.sizeDelta = newSize;
 
-            ManaReso.SetText("Da_FlowerLab", Language.GetStr("FlowerName", "Flower" + flowerInfo.ID));
+            ManaReso.SetText("Da_FlowerLab", Language.GetStr("FlowerName", "Flower" + flowerInfo.ID_));
         }
         else
         {
@@ -171,14 +171,14 @@ public class Award
                         {
                             flowerFlag = true;
 
-                            Vector2 newSize = flowerInfo.Sprite.rect.size;
+                            Vector2 newSize = flowerInfo.Icon.rect.size;
                             newSize.x *= 0.2f;
                             newSize.y *= 0.2f;
 
-                            ManaReso.Get<Image>("Da_FlowerIcon").sprite = flowerInfo.Sprite;
+                            ManaReso.Get<Image>("Da_FlowerIcon").sprite = flowerInfo.Icon;
                             ManaReso.Get<Image>("Da_FlowerIcon").rectTransform.sizeDelta = newSize;
 
-                            ManaReso.SetText("Da_FlowerLab", Language.GetStr("FlowerName", "Flower" + flowerInfo.ID));
+                            ManaReso.SetText("Da_FlowerLab", Language.GetStr("FlowerName", "Flower" + flowerInfo.ID_));
 
                             break;
                         }
@@ -784,12 +784,12 @@ public class ManaMiniGame : Regist
 
             if (OpList.Count >= 2)
             {
-                OpList[0].SetFirstOp();
-                OpList[1].SetSecondOp();
+                OpList[0].FirstOp();
+                OpList[1].SecondOp();
             }
             else if (OpList.Count >= 1)
             {
-                OpList[0].SetFirstOp();
+                OpList[0].FirstOp();
             }
         }
         else

+ 16 - 5
Assets/Script/Manage/ManaReso.cs

@@ -495,7 +495,7 @@ public class ManaReso : Regist
             dropGold = tra.AddScript<DropGold>();
         }
 
-        dropGold.ResetSta();
+        dropGold.ResetStatus();
 
         return dropGold;
     }
@@ -514,7 +514,7 @@ public class ManaReso : Regist
             dropDiamond = tra.AddScript<DropDiamond>();
         }
 
-        dropDiamond.ResetSta();
+        dropDiamond.ResetStatus();
 
         return dropDiamond;
     }
@@ -618,11 +618,17 @@ public class ManaReso : Regist
         return tra;
     }
 
-    public static Transform GetAnim(Bounds bounds, ObjType obj, Vector3 pos, Transform parTra)
+    public static Transform GetElf(Flower flower, ObjType obj)
     {
         Transform tra;
 
-        tra = Get(obj.ToString(), Folder.Scene, false, parTra, pos, obj);
+        Bounds bounds = flower.FlowerIcon.bounds;
+        Vector3 pos = flower.FlowerIcon.transform.position;
+        Transform par = flower.transform;
+
+        pos.z -= Random.Range(0.001f, 0.1f);
+
+        tra = Get(obj.ToString(), Folder.Scene, false, par, pos, obj);
 
         ObjRoot objRoot = tra.GetComponent<ObjRoot>();
 
@@ -630,7 +636,7 @@ public class ManaReso : Regist
         {
             tra.AddComponent<ObjRoot>().ObjType = obj;
 
-            tra.GetChild(0).AddComponent<AnimationReceiver>();
+            tra.GetChild(0).AddScript<Elf>();
         }
 
         if (Random.Range(0f, 1f) <= 0.5f)
@@ -647,6 +653,11 @@ public class ManaReso : Regist
 
         tra.position += new Vector3(offsetX, offsetY, 0);
 
+        Elf elf = tra.GetChild(0).GetComponent<Elf>();
+        
+        elf.Flower = flower;
+        elf.Animator.SetTrigger("Play");
+
         return tra;
     }
 

+ 6 - 4
Assets/Script/Manage/ManaServer.cs

@@ -48,7 +48,7 @@ public class ManaServer : Regist
 
         urlData.Add("u", SystemInfo.deviceUniqueIdentifier);
 
-        URLRequest.CreateURLRequest("https://garden.dashgame.com/index.php/Home/User/login", urlData, LoginCallback, URLRequest.Method.POST);
+        URLRequest.CreateURLRequest("https://garden.dashgame.com/index.php/home/user/login", urlData, LoginCallback, URLRequest.Method.POST);
     }
 
     private static void LoginCallback(JsonData jsonData)
@@ -57,6 +57,8 @@ public class ManaServer : Regist
         {
             Connect = true;
             ID = jsonData["i"].ToJson();
+            
+            //Debug.Log(DateUtil.GetTime(jsonData["time"].ToJson()));
         }
     }
 
@@ -64,7 +66,7 @@ public class ManaServer : Regist
     {
         URLRequestData urlData = new URLRequestData();
         
-        urlData.Add("i", ID);
+        urlData.Add("u", SystemInfo.deviceUniqueIdentifier);
         urlData.Add("l", Data.PlayerDoc.OuterXml);
 
         URLRequest.CreateURLRequest("https://garden.dashgame.com/index.php/home/user/save", urlData, SaveCallback, URLRequest.Method.POST);
@@ -79,9 +81,9 @@ public class ManaServer : Regist
     {
         URLRequestData urlData = new URLRequestData();
 
-        urlData.Add("i", ID);
+        urlData.Add("u", SystemInfo.deviceUniqueIdentifier);
 
-        URLRequest.CreateURLRequest("https://garden.dashgame.com/index.php/Home/User/load", urlData, LoadCallback, URLRequest.Method.POST);
+        URLRequest.CreateURLRequest("https://garden.dashgame.com/index.php/home/user/load", urlData, LoadCallback, URLRequest.Method.POST);
     }
 
     private static void LoadCallback(JsonData jsonData)

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

@@ -39,7 +39,7 @@ public class Sign
 
         Diamond = IntParse(attribute[2].Value);
 
-        FlowerList = Auxiliary.ToIntList(attribute[1].Value);
+        FlowerList = Auxiliary.IntListParse(',', attribute[1].Value, new List<int>());
     }
 
 

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

@@ -251,14 +251,14 @@ public class ManaUI : Regist
             {
                 FlowerInfo flowerInfo = ManaGarden.FlowerInfoDic.Random();
 
-                Vector2 newSize = flowerInfo.Sprite.rect.size;
+                Vector2 newSize = flowerInfo.Icon.rect.size;
                 newSize.x *= 0.2f;
                 newSize.y *= 0.2f;
 
-                ManaReso.Get<Image>("Da_FlowerIcon").sprite = flowerInfo.Sprite;
+                ManaReso.Get<Image>("Da_FlowerIcon").sprite = flowerInfo.Icon;
                 ManaReso.Get<Image>("Da_FlowerIcon").rectTransform.sizeDelta = newSize;
 
-                ManaReso.SetText("Da_FlowerLab", Language.GetStr("FlowerName", "Flower" + flowerInfo.ID));
+                ManaReso.SetText("Da_FlowerLab", Language.GetStr("FlowerName", "Flower" + flowerInfo.ID_));
 
 
                 ManaReso.SetText("Da_Tit", Language.GetStr("UI", "Da_Tit0"));
@@ -1185,7 +1185,7 @@ public class ManaUI : Regist
                 ManaReso.Get<Button>("L_SimChi").image.color = ManaColor.Orange;
                 ManaReso.Get<Button>("L_English").image.color = ManaColor.LightGray;
 
-                ManaLan.SwitchLanguage("ChineseSimplified");
+                ManaLan.SwitchLanguage(Lan.ChineseSimplified);
             }
         );
 
@@ -1202,7 +1202,7 @@ public class ManaUI : Regist
                 ManaReso.Get<Button>("L_SimChi").image.color = ManaColor.LightGray;
                 ManaReso.Get<Button>("L_English").image.color = ManaColor.Orange;
 
-                ManaLan.SwitchLanguage("English");
+                ManaLan.SwitchLanguage(Lan.English);
             }
         );
 

+ 7 - 7
Assets/Script/Object/Drop.cs

@@ -18,8 +18,8 @@ public class Drop : ObjRoot,IPointerClickHandler
     {
         enabled = true;
 
-        Tween tween = transform.CreateTweenSr(new Color(1, 1, 1, 1), new Color(1, 1, 1, 0), 0.25f, true, false, Curve.EaseOutQuad);
-        transform.CreateTweenScale(new Vector3(0.8f, 0.8f, 0.8f), new Vector3(1.2f, 1.2f, 1.2f), 0.25f, true, false, Curve.EaseOutQuad);
+        transform.CreateTweenSr(new Color(1, 1, 1, 1), new Color(1, 1, 1, 0), 0.25f, true, false, Curve.EaseOutQuad);
+        Tween tween = transform.CreateTweenScale(new Vector3(0.8f, 0.8f, 0.8f), new Vector3(1.2f, 1.2f, 1.2f), 0.25f, true, false, Curve.EaseOutQuad);
 
         tween.OnForwardFinish += () =>
         {
@@ -43,7 +43,7 @@ public class Drop : ObjRoot,IPointerClickHandler
     }
 
 
-    public void ResetSta()
+    public void ResetStatus()
     {
         Move = true;
 
@@ -52,14 +52,14 @@ public class Drop : ObjRoot,IPointerClickHandler
         transform.localScale = new Vector3(0.8f, 0.8f, 0.8f);
 
         transform.GetTweenSr().InOrigin = true;
-        GetComponent<SpriteRenderer>().color = new Color(1, 1, 1, 1);
-        transform.GetComponent<BoxCollider2D>().enabled = true;
+        GetComponent<SpriteRenderer>().SetAlpha(1);
+        transform.SetCollider(true);
     }
 
     public void Retrieve()
     {
         transform.TweenConForSr();
-        transform.GetComponent<BoxCollider2D>().enabled = false;
+        transform.SetCollider(false);
     }
 
     public virtual void OnPointerClick(PointerEventData eventData)
@@ -68,6 +68,6 @@ public class Drop : ObjRoot,IPointerClickHandler
 
         transform.TweenForSr();
         transform.TweenForScale();
-        transform.GetComponent<BoxCollider2D>().enabled = false;
+        transform.SetCollider(false);
     }
 }

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

@@ -0,0 +1,29 @@
+using UnityEngine;
+
+using System.Collections;
+using System.Collections.Generic;
+
+public class Elf : Regist
+{
+	#region 变量
+
+    public Flower Flower;
+    public Animator Animator;
+    public Transform Root;
+
+    #endregion
+
+    public void Save()
+    {
+        Flower.ElfList.Remove(transform);
+
+        ManaReso.Save(Root);
+    }
+
+
+    public override void RegistImmed()
+    {
+        Root = transform.parent;
+        Animator = GetComponent<Animator>();
+    }
+}

+ 2 - 2
Assets/Script/Interface/AnimationReceiver.cs.meta → Assets/Script/Object/Elf.cs.meta

@@ -1,6 +1,6 @@
 fileFormatVersion: 2
-guid: 1b5d92c94ceaa69468d2bd75c7217161
-timeCreated: 1491383783
+guid: 1cb5d3295076dc5468e3e536af379a9d
+timeCreated: 1492741907
 licenseType: Pro
 MonoImporter:
   serializedVersion: 2

+ 96 - 78
Assets/Script/Object/Flower.cs

@@ -30,13 +30,15 @@ public class FlowerInfo
 
             if (_Plant)
             {
+                Text.SetActive(true);
+
                 ManaLan.Add(Text, new LanStr("Object", "FlowerItemG_Lab"));
 
                 UIPartical.Begin();
             }
             else
             {
-                Text.text = "";
+                Text.SetActive(false);
             }
         }
     }
@@ -49,7 +51,6 @@ public class FlowerInfo
 
             if (_Unlock)
             {
-                Text.text = "";
                 Image.material = null;
 
                 Button.interactable = true;
@@ -80,51 +81,60 @@ public class FlowerInfo
     {
         get
         {
-            return Language.GetStr("FlowerName", _Name);
+            return Language.GetStr("FlowerName", ID);
         }
-        set { _Name = value; }
+    }
+    public string ID
+    {
+        get
+        {
+            return "Flower" + ID_;
+        }
+    }
+    public string Description
+    {
+        get { return Language.GetStr("FlowerDesc", ID); }
     }
 
-    public bool _Plant; 
-    public bool _Unlock;
-    public string _Name;
+    public Sprite Icon
+    {
+        get { return ManaReso.Load<Sprite>(Icon_, Folder.Scene); }
+    }
 
-    public int ID;
+    public int ID_;
+    public bool _Plant;
+    public bool _Unlock;
+    public string Icon_;
     public bool Special;
-    public string Description;
 
     public Slot Slot;
     public Text Text;
-    public Sprite Sprite;
     public Image Image;
     public Button Button;
     public UIPartical UIPartical;
-    public Transform ItemTra;
+    public Transform FlowerItem;
 
     #endregion
 
     public FlowerInfo(XmlAttributeCollection attribute)
     {
-        ItemTra = ManaReso.Get("FlowerItemG", Folder.UI, false, ManaReso.Get("G_RegularGrid"),  false);
+        FlowerItem = ManaReso.Get("FlowerItemG", Folder.UI, false, ManaReso.Get("G_RegularGrid"),  false);
 
         Dictionary<string, Transform> dic = new Dictionary<string, Transform>();
 
-        Auxiliary.CompileDic(ItemTra, dic);
+        Auxiliary.CompileDic(FlowerItem, dic);
 
         Text = dic["Lab"].GetComponent<Text>();
         Image = dic["Icon"].GetComponent<Image>();
         Button = dic["FlowerItemG"].GetComponent<Button>();
         UIPartical = dic["UIParticle System"].GetComponent<UIPartical>();
 
-        ID = int.Parse(attribute[0].Value);
-        Sprite = ManaReso.Load<Sprite>(attribute[3].Value, Folder.Scene);
+        ID_ = int.Parse(attribute[0].Value);
+        Icon_ = attribute[3].Value;
 
-        _Name = "Flower" + ID;
-        Description = attribute[2].Value;
+        Image.sprite = Icon;
 
-        Image.sprite = Sprite;
-
-        Vector2 newSize = Sprite.rect.size;
+        Vector2 newSize = Icon.rect.size;
         newSize.x *= 0.2f;
         newSize.y *= 0.2f;
         Image.rectTransform.sizeDelta = newSize;
@@ -145,31 +155,30 @@ public class Flower : ObjRoot, IPointerClickHandler
 
     #region MiniGame
 
-    public int Phase
+    public OpType OpType
     {
-        get { return _Phase; }
+        get { return OpType_; }
         set
         {
-            _Phase = value;
+            OpType_ = value;
 
-            if (Phase == 1)
+            if (OpType_ == OpType.Rip)
             {
-                Phase = 0;
-
-                OperateBk.SetActive(false);
-                OperateIcon.SetActive(false);
-                OperateOutline.SetActive(false);
-
-                ManaReso.GetHudText("得分+15", Color.white, 25, ChildDic["ScorePosTra"], ManaReso.Get("D_Status"), true);
-
-                ManaMiniGame.Score += 15;
+                OperateIcon.sprite = RipSprite;
+            }
+            else if (OpType_ == OpType.Water)
+            {
+                OperateIcon.sprite = WaterSprite;
+            }
+            else if (OpType_ == OpType.Fertilize)
+            {
+                OperateIcon.sprite = FertilizeSprite;
             }
         }
     }
 
-    private int _Phase;
+    public OpType OpType_;
 
-    public OpType OpType;
     public SpriteRenderer FlowerIcon;
     public SpriteRenderer OperateBk;
     public SpriteRenderer OperateIcon;
@@ -179,12 +188,12 @@ public class Flower : ObjRoot, IPointerClickHandler
 
     public bool Award
     {
-        get { return _Award; }
+        get { return Award_; }
         set
         {
-            _Award = value;
+            Award_ = value;
 
-            if (_Award)
+            if (Award_)
             {
                 ShowAward();
             }
@@ -194,19 +203,42 @@ public class Flower : ObjRoot, IPointerClickHandler
             }
         }
     }
+
+    public Sprite RipSprite
+    {
+        get
+        {
+            return ManaReso.Load<Sprite>("Rip", Folder.UI);
+        }
+    }
+    public Sprite WaterSprite
+    {
+        get
+        {
+            return ManaReso.Load<Sprite>("Water", Folder.UI);
+        }
+    }
+    public Sprite FertilizeSprite
+    {
+        get
+        {
+            return ManaReso.Load<Sprite>("Fertilize", Folder.UI);
+        }
+    }
     public FlowerInfo FlowerInfo
     {
-        get { return _FlowerInfo; }
+        get { return FlowerInfo_; }
         set
         {
-            _FlowerInfo = value;
+            FlowerInfo_ = value;
 
-            FlowerIcon.sprite = FlowerInfo.Sprite;
+            ID = FlowerInfo.ID_;
+            FlowerIcon.sprite = FlowerInfo.Icon;
         }
     }
 
-    public bool _Award;
-    private FlowerInfo _FlowerInfo;
+    public bool Award_;
+    private FlowerInfo FlowerInfo_;
 
     public int ID;
     public Slot Slot;
@@ -264,6 +296,7 @@ public class Flower : ObjRoot, IPointerClickHandler
     public void GameOver()
     {
         ChildDic["MiniGame"].SetActive(false);
+
         OperateBk.TweenBacScale();
     }
 
@@ -274,7 +307,7 @@ public class Flower : ObjRoot, IPointerClickHandler
         OperateIcon.SetActive(false);
     }
 
-    public void SetFirstOp()
+    public void FirstOp()
     {
         OperateBk.TweenForScale();
 
@@ -285,7 +318,7 @@ public class Flower : ObjRoot, IPointerClickHandler
         OperateOutline.SetActive(true);
     }
 
-    public void SetSecondOp()
+    public void SecondOp()
     {
         OperateIcon.SetAlpha(1);
         OperateOutline.SetAlpha(1);
@@ -294,7 +327,7 @@ public class Flower : ObjRoot, IPointerClickHandler
         OperateOutline.SetActive(false);
     }
 
-    public void SetThirdOp()
+    public void ThirdOp()
     {
         OperateIcon.SetAlpha(0.5f);
         OperateOutline.SetAlpha(0.5f);
@@ -312,30 +345,27 @@ public class Flower : ObjRoot, IPointerClickHandler
         if (random <= 0.3333333f)
         {
             OpType = OpType.Rip;
-            OperateIcon.sprite = ManaReso.Load<Sprite>("Rip", Folder.UI);
         }
         else if (random <= 0.6666666f)
         {
             OpType = OpType.Water;
-            OperateIcon.sprite = ManaReso.Load<Sprite>("Water", Folder.UI);
         }
         else
         {
             OpType = OpType.Fertilize;
-            OperateIcon.sprite = ManaReso.Load<Sprite>("Fertilize", Folder.UI);
         }
 
         if (sequence == 0)
         {
-            SetFirstOp();
+            FirstOp();
         }
         else if (sequence == 1)
         {
-            SetSecondOp();
+            SecondOp();
         }
         else
         {
-            SetThirdOp();
+            ThirdOp();
         }
     }
 
@@ -344,36 +374,23 @@ public class Flower : ObjRoot, IPointerClickHandler
         OpType = opType;
         OperateBk.SetActive(true);
 
-        if (opType == OpType.Rip)
-        {
-            OperateIcon.sprite = ManaReso.Load<Sprite>("Rip", Folder.UI);
-        }
-        else if (opType == OpType.Water)
-        {
-            OperateIcon.sprite = ManaReso.Load<Sprite>("Water", Folder.UI);
-        }
-        else if (opType == OpType.Fertilize)
-        {
-            OperateIcon.sprite = ManaReso.Load<Sprite>("Fertilize", Folder.UI);
-        }
-
         if (sequence == 0)
         {
-            SetFirstOp();
+            FirstOp();
         }
         else if (sequence == 1)
         {
-            SetSecondOp();
+            SecondOp();
         }
         else
         {
-            SetThirdOp();
+            ThirdOp();
         }
     }
 
     public bool Operate(OpType opType)
     {
-        if (opType != OpType) //错误的操作
+        if (opType != OpType) //操作错误
         {
             OperateBk.TweenForSr();
             FlowerIcon.TweenForSr();
@@ -383,14 +400,20 @@ public class Flower : ObjRoot, IPointerClickHandler
 
             return false;
         }
-        else //操作正确 植物升级
+        else //操作正确
         {
-            Phase++;
+            ManaReso.GetHudText("得分+15", Color.white, 25, ChildDic["ScorePosTra"], ManaReso.Get("D_Status"), true);
+
+            ManaMiniGame.Score += 15;
 
             PlayParticle();
 
             OperateBk.TweenBacScale();
 
+            OperateBk.SetActive(false);
+            OperateIcon.SetActive(false);
+            OperateOutline.SetActive(false);
+
             return true;
         }
     }
@@ -400,12 +423,7 @@ public class Flower : ObjRoot, IPointerClickHandler
 
     public void PlayAnim(ObjType obj)
     {
-        Transform elf = ManaReso.GetAnim(FlowerIcon.bounds, obj, FlowerIcon.transform.position, transform);
-        Animator animator = elf.GetComponentInChildren<Animator>();
-
-        ElfList.Add(elf);
-
-        animator.SetTrigger("Play");
+        ElfList.Add(ManaReso.GetElf(this, obj));
     }
 
     public void PlayParticle()
@@ -423,7 +441,7 @@ public class Flower : ObjRoot, IPointerClickHandler
         int coin = Mathf.CeilToInt(ManaData.CoinPerson*Random.Range(0.05f, 0.08f)*ManaData.SkillPlus);
 
         ManaData.Coin += coin;
-        ManaData.FlowerCoin += coin;
+        ManaData.FlowerCoin++;
 
         ManaReso.GetHudText("+" + coin, Color.white, 25, ChildDic["GoldPosTra"], ManaReso.Get("A_HudParent"), true);
 

+ 17 - 110
Assets/Script/Object/Garden.cs

@@ -184,29 +184,6 @@ public class Garden : Regist, IDragHandler, IPointerClickHandler, IEndDragHandle
 
     public override void RegistReference()
     {
-        if (ManaTutorial.TutorialA)
-        {
-            TutorialRegistReference();
-        }
-        else
-        {
-            RegularRegistReference();
-        }
-    }
-
-
-    public override void TutorialToRegular()
-    {
-        Player = ManaReso.Get("Player");
-        PlayerPos = new List<Vector3>()
-        {
-            ManaPlayer.Player.ChildDic["PlayerTra1"].position,
-            ManaPlayer.Player.ChildDic["PlayerTra2"].position,
-        };
-    }
-
-    private void TutorialRegistReference()
-    {
         GardenBk2 = ManaReso.Get("GardenBk2");
         GardenBk3 = ManaReso.Get("GardenBk3");
         GardenBk4 = ManaReso.Get("GardenBk4");
@@ -236,41 +213,22 @@ public class Garden : Regist, IDragHandler, IPointerClickHandler, IEndDragHandle
             ManaReso.Get("PageTraA").position,
             ManaReso.Get("PageTraB").position,
         };
-    }
-
-    private void RegularRegistReference()
-    {
-        GardenBk2 = ManaReso.Get("GardenBk2");
-        GardenBk3 = ManaReso.Get("GardenBk3");
-        GardenBk4 = ManaReso.Get("GardenBk4");
 
-        Player = ManaReso.Get("Player");
-        GardenA = ManaReso.Get("GardenA");
-
-        GardenPosBk2 = new List<Vector3>()
+        if (!ManaTutorial.TutorialA)
         {
-            ManaReso.Get("PageTra21").position,
-            ManaReso.Get("PageTra22").position,
-        };
-
-        GardenPosBk3 = new List<Vector3>()
-        {
-            ManaReso.Get("PageTra31").position,
-            ManaReso.Get("PageTra32").position,
-        };
-
-        GardenPosBk4 = new List<Vector3>()
-        {
-            ManaReso.Get("PageTra41").position,
-            ManaReso.Get("PageTra42").position,
-        };
+            Player = ManaReso.Get("Player");
+            PlayerPos = new List<Vector3>()
+            {
+                ManaPlayer.Player.ChildDic["PlayerTra1"].position,
+                ManaPlayer.Player.ChildDic["PlayerTra2"].position,
+            };
+        }
+    }
 
-        GardenPosA = new List<Vector3>()
-        {
-            ManaReso.Get("PageTraA").position,
-            ManaReso.Get("PageTraB").position,
-        };
 
+    public override void TutorialToRegular()
+    {
+        Player = ManaReso.Get("Player");
         PlayerPos = new List<Vector3>()
         {
             ManaPlayer.Player.ChildDic["PlayerTra1"].position,
@@ -332,13 +290,6 @@ public class Garden : Regist, IDragHandler, IPointerClickHandler, IEndDragHandle
                         float tempX = Mathf.Clamp(eventData.delta.x / 10, -2, 2) * speed;
 
                         GardenA.Translate(GardenA.right * tempX, Space.World);
-
-                        //if (GardenA.position.x - GardenPosA[ValidPage - 1].x < -0.7f)
-                        //{
-                        //    GardenA.SetX(GardenPosA[ValidPage - 1].x - 0.7f);
-
-                        //    Return();
-                        //}
                     }
 
                     #endregion
@@ -381,13 +332,6 @@ public class Garden : Regist, IDragHandler, IPointerClickHandler, IEndDragHandle
                         float tempX = Mathf.Clamp(eventData.delta.x / 10, -2, 2) * speed;
 
                         GardenA.Translate(GardenA.right * tempX, Space.World);
-
-                        //if (GardenA.position.x - GardenPosA[0].x > 0.7f)
-                        //{
-                        //    GardenA.SetX(GardenPosA[0].x + 0.7f);
-
-                        //    Return();
-                        //}
                     }
 
                     #endregion
@@ -425,49 +369,12 @@ public class Garden : Regist, IDragHandler, IPointerClickHandler, IEndDragHandle
 
             if (slot.Valid == false)
             {
-                return;
+                Toast.Show(1.5f, Language.GetStr("Common", "UnlockSlot"));
+            }
+            else
+            {
+                ManaReso.Get("G_Flower").TweenForCG();
             }
-
-            ManaReso.Get("G_Flower").TweenForCG();
-
-            //FlowerInfo flowerInfo = null;
-            //FlowerCard flowerCard = ManaReso.Get<FlowerCard>("H_FlowerCard");
-
-            //for (int i = 0; i < ManaGarden.FlowerInfoList.Count; i++)
-            //{
-            //    FlowerInfo temp = ManaGarden.FlowerInfoList[i];
-
-            //    if (temp.Plant == false && temp.Unlock)
-            //    {
-            //        flowerInfo = temp;
-
-            //        flowerCard.Add(temp);
-            //    }
-            //}
-
-            //if (flowerInfo == null)
-            //{
-            //    ManaReso.Get("G_Flower").TweenForCG();
-            //}
-            //else
-            //{
-            //    ManaGarden.ShowPlantCard(slot, flowerInfo);
-
-            //    Auxiliary.Instance.DelayCall
-            //    (
-            //        () =>
-            //        {
-            //            flowerCard.Select(0);
-
-            //            flowerCard.LeftBorder = ManaReso.Get("H_Grid").position.x - Mathf.Abs(flowerCard.ItemList.Last(0).position.x - ManaReso.Get("H_Scrr").position.x);
-            //            flowerCard.RightBorder = ManaReso.Get("H_Grid").position.x + Mathf.Abs(flowerCard.ItemList[0].position.x - ManaReso.Get("H_Scrr").position.x);
-
-            //            ManaReso.Get<ContentSizeFitter>("H_Grid").enabled = false;
-            //            ManaReso.Get<HorizontalLayoutGroup>("H_Grid").enabled = false;
-            //        },
-            //        1
-            //    );
-            //}
         }
     }
 

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

@@ -94,7 +94,7 @@ public class Ability : SkillRoot
             {
                 ItemBtn.interactable = true;
 
-                ManaLan.Add(ItemBtnLab, new LanStr("UI", "Fe_BtnLab2"), "\n", ImageParse(UpgradeCur), UpgradeAmt.ToString("0"));
+                ItemBtnLab.text = Language.GetStr("UI", "Fe_BtnLab2") + "\n" + ImageParse(UpgradeCur) + Auxiliary.ShrinkNumberStr(NewUpgradeAmt);
             }
         }
     }
@@ -118,11 +118,11 @@ public class Ability : SkillRoot
         UpgradePlus = attribute[16].Value;
         UpgradePerson = attribute[17].Value;
 
-        ItemIndex = IntParse(attribute[3].Value);
-        UnlockLv = IntParse(attribute[7].Value);
+        ItemIndex = Auxiliary.IntParse(attribute[3].Value,0);
+        UnlockLv = Auxiliary.IntParse(attribute[7].Value,0);
 
-        UnlockAmt = FloatParse(attribute[11].Value);
-        UnlockAheadAmt = FloatParse(attribute[9].Value);
+        UnlockAmt = Auxiliary.FloatParse(attribute[11].Value,0);
+        UnlockAheadAmt = Auxiliary.FloatParse(attribute[9].Value,0);
 
         SkillTab = SkillClassParse(attribute[2].Value);
         UpgradeAmt = UpgradeAmtParse(attribute[14].Value);
@@ -238,6 +238,13 @@ public class Ability : SkillRoot
         }
     }
 
+    public override void SwitchLanguage()
+    {
+        base.SwitchLanguage();
+
+        ItemBtnLab.text = Language.GetStr("UI", "Fe_BtnLab2") + "\n" + ImageParse(UpgradeCur) + Auxiliary.ShrinkNumberStr(NewUpgradeAmt);
+    }
+
 
     protected void Unlock()
     {
@@ -272,7 +279,8 @@ public class Ability : SkillRoot
         }
 
         ManaReso.Get("Fe_Info").TweenForCG();
-        ManaReso.SetText("Fe_Tit", Name);
+        
+        ManaReso.SetText("Fe_Tit", NameParse());
         ManaReso.SetSprite("Fe_Icon", ItemIcon.sprite);
 
         if (ItemStatus == SkillStatus.Lock)
@@ -337,8 +345,10 @@ public class Ability : SkillRoot
                     ManaReso.SetText("Fe_Lab0", Description(0));
                     ManaReso.SetText("Fe_Lab1", Description(1));
 
-                    ManaReso.SetText("Fe_BtnLab", string.Format("{0}({1}{2:0})", Language.GetStr("UI", "Fe_BtnLab2"), ImageParse(UpgradeCur), NewUpgradeAmt));
+                    ManaReso.SetText("Fe_BtnLab", string.Format("{0}({1}{2:0})", Language.GetStr("UI", "Fe_BtnLab2"), ImageParse(UpgradeCur), Auxiliary.ShrinkNumberStr(NewUpgradeAmt)));
 
+                    ItemBtnLab.text = Language.GetStr("UI", "Fe_BtnLab2") + "\n" + ImageParse(UpgradeCur) + Auxiliary.ShrinkNumberStr(NewUpgradeAmt);
+                    
                     ManaDebug.Log(string.Format("<color=red>{0}</color>升级 : {1}", Name, Level));
                 }
             );
@@ -355,7 +365,7 @@ public class Ability : SkillRoot
         {
             return;
         }
-
+        
         if (ID == "Ability1")
         {
             Level += 20;
@@ -389,7 +399,7 @@ public class Ability : SkillRoot
 
             if (strings.Length == 1)
             {
-                ManaGarden.AnimList.Add((ObjType) Enum.Parse(typeof(ObjType), strings[0]));
+                ManaGarden.ElfList.Add((ObjType) Enum.Parse(typeof(ObjType), strings[0]));
             }
             else if (strings.Length > 1)
             {
@@ -497,7 +507,7 @@ public class Ability : SkillRoot
 
                 Flower flower = ManaGarden.PlantList.Random().Flower;
 
-                flower.PlayAnim(ManaGarden.AnimList.Last(0));
+                flower.PlayAnim(ManaGarden.ElfList.Last(0));
 
                 ManaReso.Get<Button>("F_Close").onClick.Invoke();
 

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

@@ -84,7 +84,7 @@ public class BigSkill : Skill
             }
             else if (ItemStatus_ == SkillStatus.Upgrade)
             {
-                ManaLan.Add(ItemBtnLab, new LanStr("UI", "Fe_BtnLab2"), "\n", ImageParse(UpgradeCur), UpgradeAmt.ToString("0"));
+                ManaLan.Add(ItemBtnLab, new LanStr("UI", "Fe_BtnLab2"), "\n", ImageParse(UpgradeCur), NewUpgradeAmt.ToString("0"));
             }
         }
     }
@@ -95,7 +95,7 @@ public class BigSkill : Skill
 
     public BigSkill(XmlAttributeCollection attribute) : base(attribute)
     {
-        BarIndex = IntParse(attribute[4].Value);
+        BarIndex = Auxiliary.IntParse(attribute[4].Value,0);
 
         SkillType = SkillType.BigSkill;
     }

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

@@ -78,10 +78,10 @@ public class Pack : SkillRoot
         Label = attribute[16].Value;
         Flower = attribute[9].Value;
 
-        ItemIndex = IntParse(attribute[3].Value);
-        UseAmt = FloatParse(attribute[12].Value);
-        CoinOnce = FloatParse(attribute[7].Value);
-        DiamondOnce = FloatParse(attribute[8].Value);
+        ItemIndex = Auxiliary.IntParse(attribute[3].Value,0);
+        UseAmt = Auxiliary.FloatParse(attribute[12].Value,0);
+        CoinOnce = Auxiliary.FloatParse(attribute[7].Value,0);
+        DiamondOnce = Auxiliary.FloatParse(attribute[8].Value,0);
         
         SkillTab = SkillClassParse(attribute[2].Value);
         BuyCur = CurrentParse(attribute[11].Value);
@@ -305,7 +305,7 @@ public class Pack : SkillRoot
         }
         else
         {
-            return IntParse(str.Split(',')[0]);
+            return Auxiliary.IntParse(str.Split(',')[0],0);
         }
     }
 
@@ -317,7 +317,7 @@ public class Pack : SkillRoot
         }
         else
         {
-            return IntParse(str.Split(',')[1]);
+            return Auxiliary.IntParse(str.Split(',')[1],0);
         }
     }
 

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

@@ -112,7 +112,7 @@ public class Skill : SkillRoot
             }
             else if (ItemStatus_ == SkillStatus.Upgrade)
             {
-                ManaLan.Add(ItemBtnLab, new LanStr("UI", "Fe_BtnLab2"));
+                ManaLan.Add(ItemBtnLab, new LanStr("UI", "Fe_BtnLab2"), "\n", ImageParse(UpgradeCur), NewUpgradeAmt.ToString("0"));
             }
         }
     }
@@ -138,18 +138,18 @@ public class Skill : SkillRoot
         UpgradeDuration = attribute[27].Value;
         UpgradeCoinOnce = attribute[26].Value;
 
-        ItemIndex = IntParse(attribute[3].Value);
-        UnlockLv = IntParse(attribute[13].Value);
+        ItemIndex = Auxiliary.IntParse(attribute[3].Value,0);
+        UnlockLv = Auxiliary.IntParse(attribute[13].Value,0);
 
-        CD = FloatParse(attribute[12].Value);
-        UseAmt = FloatParse(attribute[20].Value);
-        Duration = FloatParse(attribute[11].Value);
-        UnlockAmt = FloatParse(attribute[17].Value);
-        DiamondOnce = FloatParse(attribute[9].Value);
-        UnlockAheadAmt = FloatParse(attribute[15].Value);
+        CD = Auxiliary.FloatParse(attribute[12].Value,0);
+        UseAmt = Auxiliary.FloatParse(attribute[20].Value,0);
+        Duration = Auxiliary.FloatParse(attribute[11].Value,0);
+        UnlockAmt = Auxiliary.FloatParse(attribute[17].Value,0);
+        DiamondOnce = Auxiliary.FloatParse(attribute[9].Value,0);
+        UnlockAheadAmt = Auxiliary.FloatParse(attribute[15].Value,0);
 
         SkillTab = SkillClassParse(attribute[2].Value);
-        ReduceCD = BoolParse(attribute[5].Value);
+        ReduceCD = Auxiliary.BoolParse(attribute[5].Value, false);
         UpgradeAmt = UpgradeAmtParse(attribute[22].Value);
         
         BuyCur = CurrentParse(attribute[19].Value);

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

@@ -129,7 +129,7 @@ public abstract class SkillRoot
     }
 
 
-    public void SwitchLanguage()
+    public virtual void SwitchLanguage()
     {
         if (ItemLab != null)
         {
@@ -175,42 +175,6 @@ public abstract class SkillRoot
 
     #region 解读器
 
-    protected int IntParse(string str)
-    {
-        if (string.IsNullOrEmpty(str))
-        {
-            return 0;
-        }
-        else
-        {
-            return int.Parse(str);
-        }
-    }
-
-    protected bool BoolParse(string str)
-    {
-        if (string.IsNullOrEmpty(str))
-        {
-            return false;
-        }
-        else
-        {
-            return Convert.ToBoolean(int.Parse(str));
-        }
-    }
-
-    protected float FloatParse(string str)
-    {
-        if (string.IsNullOrEmpty(str))
-        {
-            return 0;
-        }
-        else
-        {
-            return float.Parse(str);
-        }
-    }
-
     protected void RegistName(Text text)
     {
         if (SkillTab == SkillTab.Null)
@@ -387,7 +351,7 @@ public abstract class SkillRoot
         else
         {
             buff = 0;
-            value = FloatParse(str);
+            value = Auxiliary.FloatParse(str, 0);
         }
     }
 

+ 2 - 3
Assets/Script/Object/Slot.cs

@@ -54,7 +54,7 @@ public class Slot : Regist
     {
         FlowerInfo = flowerInfo;
 
-        ID = flowerInfo.ID;
+        ID = flowerInfo.ID_;
 
         Collider.enabled = false;
 
@@ -69,8 +69,7 @@ public class Slot : Regist
         {
             Flower.PlayParticle();
         }
-
-        ManaGarden.AwardValid = true;
+        
         ManaGarden.PlantList.Add(this);
     }
 

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

@@ -17,6 +17,22 @@ using System.Runtime.Serialization.Formatters.Binary;
 using Random = UnityEngine.Random;
 using Transform = UnityEngine.Transform;
 
+public class Amount
+{
+    public static double 百 = 100;
+    public static double 千 = 1000;
+    public static double 万 = 10000;
+    public static double 十万 = 100000;
+    public static double 百万 = 1000000;
+    public static double 千万 = 10000000;
+    public static double 亿 = 100000000;
+    public static double 十亿 = 1000000000;
+    public static double 千亿 = 100000000000;
+    public static double 万亿 = 1000000000000;
+    public static double 千万亿 = 1000000000000000;
+    public static double 万万亿 = 10000000000000000;
+}
+
 public class Auxiliary : MonoBehaviour 
 {
     #region 变量
@@ -85,6 +101,11 @@ public class Auxiliary : MonoBehaviour
         //    ManaServer.Load();
         //}
 
+        if (Input.GetKeyDown(KeyCode.Space))
+        {
+            ManaData.Coin = 0;
+        }
+
         if (Input.GetKeyDown(KeyCode.P))
         {
             ManaData.Level += 20;
@@ -400,15 +421,212 @@ public class Auxiliary : MonoBehaviour
     }
 
 
-    public static List<int> ToIntList(string str)
+    public static string OmitNumberStr(int accuray, string str)
+    {
+        int index = str.IndexOf('.');
+
+        if (index == -1)
+        {
+            return str;
+        }
+
+        if (accuray == 0)
+        {
+            return str.Substring(0, index);
+        }
+        else
+        {
+            return str.Substring(0, index + accuray + 1);
+        }
+    }
+
+
+    public static long ShrinkNumber(double value, int accuracy = 1)
+    {
+        long longValue = (long) value;
+        
+        if (ManaLan.CurrentLan == Lan.English)
+        {
+            if (longValue < Amount.千)
+            {
+                return longValue;
+            }
+            else if (longValue < Amount.百万)
+            {
+                long temp = (long) Amount.百;
+
+                return (longValue/ temp) * temp;
+            }
+            else if (longValue < Amount.十亿)
+            {
+                long temp = (long)Amount.十万;
+
+                return (longValue / temp) * temp;
+            }
+            else if (longValue < Amount.万亿)
+            {
+                long temp = (long)Amount.亿;
+
+                return (longValue / temp) * temp;
+            }
+            else if (longValue < Amount.千万亿)
+            {
+                long temp = (long)Amount.千亿;
+
+                return (longValue / temp) * temp;
+            }
+        }
+        else if (ManaLan.CurrentLan == Lan.ChineseSimplified)
+        {
+            if (longValue < Amount.万)
+            {
+                return longValue;
+            }
+            else if (longValue < Amount.亿)
+            {
+                long temp = (long)Amount.千;
+
+                return (longValue / temp) * temp;
+            }
+            else if (longValue < Amount.万亿)
+            {
+                long temp = (long)Amount.千万;
+
+                return (longValue / temp) * temp;
+            }
+            else if (longValue < Amount.万万亿)
+            {
+                long temp = (long)Amount.千亿;
+
+                return (longValue / temp) * temp;
+            }
+        }
+
+        throw new Exception();
+    }
+
+    public static string ShrinkNumberStr(double value, int accuracy = 1)
+    {
+        long longValue = (long) value;
+
+        if (ManaLan.CurrentLan == Lan.English)
+        {
+            if (longValue < Amount.千)
+            {
+                return longValue.ToString();
+            }
+            else if (longValue < Amount.百万)
+            {
+                string str = (longValue / Amount.千).ToString();
+
+                return OmitNumberStr(accuracy, str) + "K";
+            }
+            else if (longValue < Amount.十亿)
+            {
+                string str = (longValue / Amount.百万).ToString();
+
+                return OmitNumberStr(accuracy, str) + "M";
+            }
+            else if (longValue < Amount.万亿)
+            {
+                string str = (longValue / Amount.十亿).ToString();
+
+                return OmitNumberStr(accuracy, str) + "B";
+            }
+            else if (longValue < Amount.千万亿)
+            {
+                string str = (longValue / Amount.万亿).ToString();
+
+                return OmitNumberStr(accuracy, str) + "T";
+            }
+        }
+        else if (ManaLan.CurrentLan == Lan.ChineseSimplified)
+        {
+            if (longValue < Amount.万)
+            {
+                return longValue.ToString();
+            }
+            else if (longValue < Amount.亿)
+            {
+                string str = (longValue/Amount.万).ToString();
+
+                return OmitNumberStr(accuracy, str) + "万";
+            }
+            else if (longValue < Amount.万亿)
+            {
+                string str = (longValue / Amount.亿).ToString();
+
+                return OmitNumberStr(accuracy, str) + "亿";
+            }
+            else if (longValue < Amount.万万亿)
+            {
+                string str = (longValue / Amount.万亿).ToString();
+
+                return OmitNumberStr(accuracy, str) + "万亿";
+            }
+        }
+
+        throw new Exception();
+    }
+
+
+    public static int IntParse(string str, int defaultValue)
+    {
+        if (string.IsNullOrEmpty(str))
+        {
+            return defaultValue;
+        }
+        else
+        {
+            return int.Parse(str);
+        }
+    }
+
+    public static bool BoolParse(string str, bool defaultValue)
     {
         if (string.IsNullOrEmpty(str))
         {
-            return null;
+            return defaultValue;
         }
         else
         {
-            string[] strings = str.Split(',');
+            return Convert.ToBoolean(int.Parse(str));
+        }
+    }
+
+    public static float FloatParse(string str, float defaultValue)
+    {
+        if (string.IsNullOrEmpty(str))
+        {
+            return defaultValue;
+        }
+        else
+        {
+            return float.Parse(str);
+        }
+    }
+
+    public static double DoubleParse(string str, double defaultValue)
+    {
+        if (string.IsNullOrEmpty(str))
+        {
+            return defaultValue;
+        }
+        else
+        {
+            return float.Parse(str);
+        }
+    }
+
+    public static List<int> IntListParse(char cah, string str, List<int> defaultValue)
+    {
+        if (string.IsNullOrEmpty(str))
+        {
+            return defaultValue;
+        }
+        else
+        {
+            string[] strings = str.Split(cah);
 
             List<int> list = new List<int>();
 
@@ -420,4 +638,46 @@ public class Auxiliary : MonoBehaviour
             return list;
         }
     }
+
+    public static List<string> StringListParse(char cah, string str, List<string> defaultValue)
+    {
+        if (string.IsNullOrEmpty(str))
+        {
+            return defaultValue;
+        }
+        else
+        {
+            string[] strings = str.Split(cah);
+
+            List<string> list = new List<string>();
+
+            for (int i = 0; i < strings.Length; i++)
+            {
+                list.Add(strings[i]);
+            }
+
+            return list;
+        }
+    }
+
+    public static List<double> DoubleListParse(char cah, string str, List<double> defaultValue)
+    {
+        if (string.IsNullOrEmpty(str))
+        {
+            return defaultValue;
+        }
+        else
+        {
+            string[] strings = str.Split(cah);
+
+            List<double> list = new List<double>();
+
+            for (int i = 0; i < strings.Length; i++)
+            {
+                list.Add(double.Parse(strings[i]));
+            }
+
+            return list;
+        }
+    }
 }

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

@@ -34,9 +34,9 @@ public class Language
         xml.LoadXml(textAsset.text);
     }
 
-    public static void SwitchLanguage(string str)
+    public static void SwitchLanguage(Lan lan)
     {
-        TextAsset textAsset = Bundle.Config.LoadAsset<TextAsset>(str);
+        TextAsset textAsset = Bundle.Config.LoadAsset<TextAsset>(lan.ToString());
 
         xml = new XmlDocument();
         xml.LoadXml(textAsset.text);

+ 12 - 22
Assets/Script/Tool/Data.cs

@@ -256,20 +256,22 @@ public class Data
 
         foreach (var kv in ManaAchieve.AchieveDic)
         {
-            if (kv.Value.Valid == false)
+            if (!kv.Value.Available)
             {
-                xmlNode.Attributes[0].Value += kv.Value.ID + " ";
+                xmlNode.Attributes[0].Value += kv.Value.ID_ + " ";
             }
         }
 
         xmlNode.Attributes[0].Value = xmlNode.Attributes[0].Value.TrimEnd(' ');
 
+
         PlayerNode.SelectSingleNode("AchieveData").Attributes[0].Value = ManaData.AD.ToString("0");
         PlayerNode.SelectSingleNode("AchieveData").Attributes[1].Value = ManaData.Skill.ToString("0");
         PlayerNode.SelectSingleNode("AchieveData").Attributes[2].Value = ManaData.SignAmt.ToString("0");
         PlayerNode.SelectSingleNode("AchieveData").Attributes[3].Value = ManaData.Share.ToString("0");
         PlayerNode.SelectSingleNode("AchieveData").Attributes[4].Value = ManaData.MiniGameAmt.ToString("0");
         PlayerNode.SelectSingleNode("AchieveData").Attributes[5].Value = ManaData.FlowerCoin.ToString("0");
+        PlayerNode.SelectSingleNode("AchieveData").Attributes[6].Value = ManaData.TotalPerson.ToString("0");
     }
 
     private static void SavePlantList()
@@ -308,11 +310,11 @@ public class Data
 
         attribute.Value = "";
 
-        for (int i = 0; i < ManaGarden.FlowerInfoDic.Count; i++)
+        foreach (var kv in ManaGarden.FlowerInfoDic)
         {
-            if (ManaGarden.FlowerInfoDic[i].Unlock)
+            if (kv.Value.Unlock)
             {
-                attribute.Value += ManaGarden.FlowerInfoDic[i].ID + " ";
+                attribute.Value += kv.Value.ID_ + " ";
             }
         }
 
@@ -466,6 +468,7 @@ public class Data
         PlayerNode.SelectSingleNode("AchieveData").Attributes[3].Value = "0";
         PlayerNode.SelectSingleNode("AchieveData").Attributes[4].Value = "0";
         PlayerNode.SelectSingleNode("AchieveData").Attributes[5].Value = "0";
+        PlayerNode.SelectSingleNode("AchieveData").Attributes[6].Value = "0";
     }
 
     private static void ResetPlantList()
@@ -487,8 +490,8 @@ public class Data
         PlayerNode.SelectSingleNode("CircleTimer").Attributes[0].Value = "10";
         PlayerNode.SelectSingleNode("MiniGameIndex").Attributes[0].Value = "0";
         PlayerNode.SelectSingleNode("Player").Attributes[0].Value = "PlayerBlond";
-        PlayerNode.SelectSingleNode("TutorialA").Attributes[0].Value = "1";
-        PlayerNode.SelectSingleNode("TutorialB").Attributes[0].Value = "1";
+        PlayerNode.SelectSingleNode("TutorialA").Attributes[0].Value = "0";
+        PlayerNode.SelectSingleNode("TutorialB").Attributes[0].Value = "0";
         PlayerNode.SelectSingleNode("TutorialIndexA").Attributes[0].Value = "1";
         PlayerNode.SelectSingleNode("TutorialIndexB").Attributes[0].Value = "1";
     }
@@ -606,21 +609,7 @@ public class Data
 
     public static List<int> GetAchieveList()
     {
-        List<int> list = new List<int>();
-
-        XmlNode node = PlayerNode.SelectSingleNode("AchieveList");
-
-        if (!string.IsNullOrEmpty(node.Attributes[0].Value))
-        {
-            string[] strings = node.Attributes[0].Value.Split(' ');
-
-            for (int i = 0; i < strings.Length; i++)
-            {
-                list.Add(int.Parse(strings[i]));
-            }
-        }
-
-        return list;
+        return Auxiliary.IntListParse(' ', GetPlayerString("AchieveList"), new List<int>());
     }
 
     public static List<double> GetAchieveData()
@@ -633,6 +622,7 @@ public class Data
         dataList.Add(double.Parse(PlayerNode.SelectSingleNode("AchieveData").Attributes[3].Value));
         dataList.Add(double.Parse(PlayerNode.SelectSingleNode("AchieveData").Attributes[4].Value));
         dataList.Add(double.Parse(PlayerNode.SelectSingleNode("AchieveData").Attributes[5].Value));
+        dataList.Add(double.Parse(PlayerNode.SelectSingleNode("AchieveData").Attributes[6].Value));
 
         return dataList;
     }

+ 16 - 13
MyLovelyGarden.sln

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

+ 13 - 2
ToList.txt

@@ -1,8 +1,19 @@
-Skill
+ManaAchieve
+
+
+Tower
+
+Prefab的名字
+
 
 小游戏时间
 
+花园技能一次的升级量
+
+
+翻译
+
 
 Font Anchor Encrypt RichText OverFlow RaycastTarget
 
-语言文档中的多余项 是否保留Tree2 Auxiliary中的测试按键 DisableButton的颜色
+语言文档中的多余项 Auxiliary中的测试按键 DisableButton的颜色