Bladeren bron

Temp 3.30

LiuQilin 8 jaren geleden
bovenliggende
commit
faa32d47f2
46 gewijzigde bestanden met toevoegingen van 1261 en 69 verwijderingen
  1. BIN
      .vs/MyLovelyGarden/v14/.suo
  2. BIN
      Assets/Resources/Animations/Flower.controller
  3. BIN
      Assets/Resources/Animations/FlowerAnimContainer.controller
  4. 0 8
      Assets/Resources/Animations/FlowerAnimContainer.controller.meta
  5. BIN
      Assets/Resources/Garden.unity
  6. BIN
      Assets/Resources/Prefab/Object/Flower.prefab
  7. BIN
      Assets/Resources/Prefab/PrefabUI/Canvas.prefab
  8. BIN
      Assets/Resources/Prefab/PrefabUI/SkillItem.prefab
  9. BIN
      Assets/Resources/Sprite/Garden/提示图标底板.png
  10. 4 36
      Assets/Resources/Sprite/Garden/提示图标底板.png.meta
  11. BIN
      Assets/Resources/Sprite/Garden/种花光效1.png
  12. 68 0
      Assets/Resources/Sprite/Garden/种花光效1.png.meta
  13. BIN
      Assets/Resources/Sprite/Garden/种花光效2.png
  14. 68 0
      Assets/Resources/Sprite/Garden/种花光效2.png.meta
  15. 9 0
      Assets/Resources/Sprite/Reference.meta
  16. BIN
      Assets/Resources/Sprite/Reference/参考.jpg
  17. 68 0
      Assets/Resources/Sprite/Reference/参考.jpg.meta
  18. BIN
      Assets/Resources/Sprite/SpriteUI/Health Wheel.png
  19. 55 0
      Assets/Resources/Sprite/SpriteUI/Health Wheel.png.meta
  20. BIN
      Assets/Resources/Sprite/SpriteUI/快来打理花园对话框.png
  21. 68 0
      Assets/Resources/Sprite/SpriteUI/快来打理花园对话框.png.meta
  22. BIN
      Assets/Resources/Sprite/SpriteUI/游戏返回按钮·左上角.png
  23. 68 0
      Assets/Resources/Sprite/SpriteUI/游戏返回按钮·左上角.png.meta
  24. 1 1
      Assets/Resources/XML/Config/PlayerConfig.xml
  25. 1 8
      Assets/Resources/XML/Config/signin_config.xml
  26. 6 2
      Assets/Script/Manage/Initializer.cs
  27. 292 0
      Assets/Script/Manage/ManaAnim.cs
  28. 47 0
      Assets/Script/Manage/ManaGarden.cs
  29. 8 4
      Assets/Script/Manage/ManaMiniGame.cs
  30. 2 0
      Assets/Script/Manage/ManaReso.cs
  31. 27 3
      Assets/Script/Manage/ManaUI.cs
  32. 63 2
      Assets/Script/Object/Flower.cs
  33. 1 1
      Assets/Script/Object/Garden.cs
  34. 24 0
      Assets/Script/Tool/Anim/Tween.cs
  35. 19 0
      Assets/Script/Tool/Anim/TweenAudio.cs
  36. 19 0
      Assets/Script/Tool/Anim/TweenCG.cs
  37. 19 0
      Assets/Script/Tool/Anim/TweenGra.cs
  38. 20 1
      Assets/Script/Tool/Anim/TweenRect.cs
  39. 19 0
      Assets/Script/Tool/Anim/TweenScale.cs
  40. 143 0
      Assets/Script/Tool/Anim/TweenSr.cs
  41. 12 0
      Assets/Script/Tool/Anim/TweenSr.cs.meta
  42. 19 0
      Assets/Script/Tool/Anim/TweenVec.cs
  43. 3 3
      Assets/Script/Tool/Auxiliary.cs
  44. 104 0
      Assets/Script/Tool/Extension.cs
  45. 1 0
      MyLovelyGarden.csproj
  46. 3 0
      MyLovelyGarden.txt

BIN
.vs/MyLovelyGarden/v14/.suo


BIN
Assets/Resources/Animations/Flower.controller


BIN
Assets/Resources/Animations/FlowerAnimContainer.controller


+ 0 - 8
Assets/Resources/Animations/FlowerAnimContainer.controller.meta

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

BIN
Assets/Resources/Garden.unity


BIN
Assets/Resources/Prefab/Object/Flower.prefab


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


BIN
Assets/Resources/Prefab/PrefabUI/SkillItem.prefab


BIN
Assets/Resources/Sprite/Garden/提示图标底板.png


+ 4 - 36
Assets/Resources/Sprite/SpriteUI/Skill/4大技能4da.png.meta → Assets/Resources/Sprite/Garden/提示图标底板.png.meta

@@ -1,6 +1,6 @@
 fileFormatVersion: 2
-guid: 50a1f7a48c4036f4da811dd54cd1bc23
-timeCreated: 1489384390
+guid: 11d74327a607f964abd9325d6ae00192
+timeCreated: 1490863974
 licenseType: Pro
 TextureImporter:
   fileIDToRecycleName: {}
@@ -58,43 +58,11 @@ TextureImporter:
     crunchedCompression: 0
     allowsAlphaSplitting: 0
     overridden: 0
-  - buildTarget: Standalone
-    maxTextureSize: 2048
-    textureFormat: -1
-    textureCompression: 1
-    compressionQuality: 50
-    crunchedCompression: 0
-    allowsAlphaSplitting: 0
-    overridden: 0
-  - buildTarget: iPhone
-    maxTextureSize: 2048
-    textureFormat: -1
-    textureCompression: 1
-    compressionQuality: 50
-    crunchedCompression: 0
-    allowsAlphaSplitting: 0
-    overridden: 0
-  - buildTarget: Android
-    maxTextureSize: 2048
-    textureFormat: -1
-    textureCompression: 1
-    compressionQuality: 50
-    crunchedCompression: 0
-    allowsAlphaSplitting: 0
-    overridden: 0
-  - buildTarget: WebGL
-    maxTextureSize: 2048
-    textureFormat: -1
-    textureCompression: 1
-    compressionQuality: 50
-    crunchedCompression: 0
-    allowsAlphaSplitting: 0
-    overridden: 0
   spriteSheet:
     serializedVersion: 2
     sprites: []
     outline: []
-  spritePackingTag: 3
+  spritePackingTag: 
   userData: 
-  assetBundleName: skill
+  assetBundleName: 
   assetBundleVariant: 

BIN
Assets/Resources/Sprite/Garden/种花光效1.png


+ 68 - 0
Assets/Resources/Sprite/Garden/种花光效1.png.meta

@@ -0,0 +1,68 @@
+fileFormatVersion: 2
+guid: 12d0c15bb96ca5f449e56b520d2c6e8e
+timeCreated: 1490860803
+licenseType: Pro
+TextureImporter:
+  fileIDToRecycleName: {}
+  serializedVersion: 4
+  mipmaps:
+    mipMapMode: 0
+    enableMipMap: 0
+    sRGBTexture: 1
+    linearTexture: 0
+    fadeOut: 0
+    borderMipMap: 0
+    mipMapFadeDistanceStart: 1
+    mipMapFadeDistanceEnd: 3
+  bumpmap:
+    convertToNormalMap: 0
+    externalNormalMap: 0
+    heightScale: 0.25
+    normalMapFilter: 0
+  isReadable: 0
+  grayScaleToAlpha: 0
+  generateCubemap: 6
+  cubemapConvolution: 0
+  seamlessCubemap: 0
+  textureFormat: 1
+  maxTextureSize: 2048
+  textureSettings:
+    filterMode: -1
+    aniso: -1
+    mipBias: -1
+    wrapMode: 1
+  nPOTScale: 0
+  lightmap: 0
+  compressionQuality: 50
+  spriteMode: 1
+  spriteExtrude: 1
+  spriteMeshType: 1
+  alignment: 0
+  spritePivot: {x: 0.5, y: 0.5}
+  spriteBorder: {x: 0, y: 0, z: 0, w: 0}
+  spritePixelsToUnits: 100
+  alphaUsage: 1
+  alphaIsTransparency: 1
+  spriteTessellationDetail: -1
+  textureType: 8
+  textureShape: 1
+  maxTextureSizeSet: 0
+  compressionQualitySet: 0
+  textureFormatSet: 0
+  platformSettings:
+  - buildTarget: DefaultTexturePlatform
+    maxTextureSize: 2048
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+  spriteSheet:
+    serializedVersion: 2
+    sprites: []
+    outline: []
+  spritePackingTag: 
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

BIN
Assets/Resources/Sprite/SpriteUI/Skill/4大技能4da.png → Assets/Resources/Sprite/Garden/种花光效2.png


+ 68 - 0
Assets/Resources/Sprite/Garden/种花光效2.png.meta

@@ -0,0 +1,68 @@
+fileFormatVersion: 2
+guid: a493f88a56af62c40a6f95e08d8cba83
+timeCreated: 1490860803
+licenseType: Pro
+TextureImporter:
+  fileIDToRecycleName: {}
+  serializedVersion: 4
+  mipmaps:
+    mipMapMode: 0
+    enableMipMap: 0
+    sRGBTexture: 1
+    linearTexture: 0
+    fadeOut: 0
+    borderMipMap: 0
+    mipMapFadeDistanceStart: 1
+    mipMapFadeDistanceEnd: 3
+  bumpmap:
+    convertToNormalMap: 0
+    externalNormalMap: 0
+    heightScale: 0.25
+    normalMapFilter: 0
+  isReadable: 0
+  grayScaleToAlpha: 0
+  generateCubemap: 6
+  cubemapConvolution: 0
+  seamlessCubemap: 0
+  textureFormat: 1
+  maxTextureSize: 2048
+  textureSettings:
+    filterMode: -1
+    aniso: -1
+    mipBias: -1
+    wrapMode: 1
+  nPOTScale: 0
+  lightmap: 0
+  compressionQuality: 50
+  spriteMode: 1
+  spriteExtrude: 1
+  spriteMeshType: 1
+  alignment: 0
+  spritePivot: {x: 0.5, y: 0.5}
+  spriteBorder: {x: 0, y: 0, z: 0, w: 0}
+  spritePixelsToUnits: 100
+  alphaUsage: 1
+  alphaIsTransparency: 1
+  spriteTessellationDetail: -1
+  textureType: 8
+  textureShape: 1
+  maxTextureSizeSet: 0
+  compressionQualitySet: 0
+  textureFormatSet: 0
+  platformSettings:
+  - buildTarget: DefaultTexturePlatform
+    maxTextureSize: 2048
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+  spriteSheet:
+    serializedVersion: 2
+    sprites: []
+    outline: []
+  spritePackingTag: 
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 9 - 0
Assets/Resources/Sprite/Reference.meta

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

BIN
Assets/Resources/Sprite/Reference/参考.jpg


+ 68 - 0
Assets/Resources/Sprite/Reference/参考.jpg.meta

@@ -0,0 +1,68 @@
+fileFormatVersion: 2
+guid: cce32f605187dbf4e95e492691ad6ffd
+timeCreated: 1490877386
+licenseType: Pro
+TextureImporter:
+  fileIDToRecycleName: {}
+  serializedVersion: 4
+  mipmaps:
+    mipMapMode: 0
+    enableMipMap: 0
+    sRGBTexture: 1
+    linearTexture: 0
+    fadeOut: 0
+    borderMipMap: 0
+    mipMapFadeDistanceStart: 1
+    mipMapFadeDistanceEnd: 3
+  bumpmap:
+    convertToNormalMap: 0
+    externalNormalMap: 0
+    heightScale: 0.25
+    normalMapFilter: 0
+  isReadable: 0
+  grayScaleToAlpha: 0
+  generateCubemap: 6
+  cubemapConvolution: 0
+  seamlessCubemap: 0
+  textureFormat: 1
+  maxTextureSize: 2048
+  textureSettings:
+    filterMode: -1
+    aniso: -1
+    mipBias: -1
+    wrapMode: 1
+  nPOTScale: 0
+  lightmap: 0
+  compressionQuality: 50
+  spriteMode: 1
+  spriteExtrude: 1
+  spriteMeshType: 1
+  alignment: 0
+  spritePivot: {x: 0.5, y: 0.5}
+  spriteBorder: {x: 0, y: 0, z: 0, w: 0}
+  spritePixelsToUnits: 100
+  alphaUsage: 1
+  alphaIsTransparency: 1
+  spriteTessellationDetail: -1
+  textureType: 8
+  textureShape: 1
+  maxTextureSizeSet: 0
+  compressionQualitySet: 0
+  textureFormatSet: 0
+  platformSettings:
+  - buildTarget: DefaultTexturePlatform
+    maxTextureSize: 2048
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+  spriteSheet:
+    serializedVersion: 2
+    sprites: []
+    outline: []
+  spritePackingTag: 
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

BIN
Assets/Resources/Sprite/SpriteUI/Health Wheel.png


+ 55 - 0
Assets/Resources/Sprite/SpriteUI/Health Wheel.png.meta

@@ -0,0 +1,55 @@
+fileFormatVersion: 2
+guid: c7dd97e9cd879304795b366cbf187bfe
+timeCreated: 1431337672
+licenseType: Store
+TextureImporter:
+  fileIDToRecycleName: {}
+  serializedVersion: 2
+  mipmaps:
+    mipMapMode: 0
+    enableMipMap: 1
+    linearTexture: 0
+    correctGamma: 0
+    fadeOut: 0
+    borderMipMap: 0
+    mipMapFadeDistanceStart: 1
+    mipMapFadeDistanceEnd: 3
+  bumpmap:
+    convertToNormalMap: 0
+    externalNormalMap: 0
+    heightScale: .25
+    normalMapFilter: 0
+  isReadable: 0
+  grayScaleToAlpha: 0
+  generateCubemap: 0
+  cubemapConvolution: 0
+  cubemapConvolutionSteps: 8
+  cubemapConvolutionExponent: 1.5
+  seamlessCubemap: 0
+  textureFormat: -1
+  maxTextureSize: 2048
+  textureSettings:
+    filterMode: -1
+    aniso: 16
+    mipBias: -1
+    wrapMode: 1
+  nPOTScale: 0
+  lightmap: 0
+  rGBM: 0
+  compressionQuality: 50
+  spriteMode: 1
+  spriteExtrude: 1
+  spriteMeshType: 1
+  alignment: 0
+  spritePivot: {x: .5, y: .5}
+  spriteBorder: {x: 0, y: 0, z: 0, w: 0}
+  spritePixelsToUnits: 100
+  alphaIsTransparency: 1
+  textureType: 8
+  buildTargetSettings: []
+  spriteSheet:
+    sprites: []
+  spritePackingTag: 
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

BIN
Assets/Resources/Sprite/SpriteUI/快来打理花园对话框.png


+ 68 - 0
Assets/Resources/Sprite/SpriteUI/快来打理花园对话框.png.meta

@@ -0,0 +1,68 @@
+fileFormatVersion: 2
+guid: 5c219cf5190fa4c47bbde3e13a53e4e4
+timeCreated: 1490876618
+licenseType: Pro
+TextureImporter:
+  fileIDToRecycleName: {}
+  serializedVersion: 4
+  mipmaps:
+    mipMapMode: 0
+    enableMipMap: 0
+    sRGBTexture: 1
+    linearTexture: 0
+    fadeOut: 0
+    borderMipMap: 0
+    mipMapFadeDistanceStart: 1
+    mipMapFadeDistanceEnd: 3
+  bumpmap:
+    convertToNormalMap: 0
+    externalNormalMap: 0
+    heightScale: 0.25
+    normalMapFilter: 0
+  isReadable: 0
+  grayScaleToAlpha: 0
+  generateCubemap: 6
+  cubemapConvolution: 0
+  seamlessCubemap: 0
+  textureFormat: 1
+  maxTextureSize: 2048
+  textureSettings:
+    filterMode: -1
+    aniso: -1
+    mipBias: -1
+    wrapMode: 1
+  nPOTScale: 0
+  lightmap: 0
+  compressionQuality: 50
+  spriteMode: 1
+  spriteExtrude: 1
+  spriteMeshType: 1
+  alignment: 0
+  spritePivot: {x: 0.5, y: 0.5}
+  spriteBorder: {x: 0, y: 0, z: 0, w: 0}
+  spritePixelsToUnits: 100
+  alphaUsage: 1
+  alphaIsTransparency: 1
+  spriteTessellationDetail: -1
+  textureType: 8
+  textureShape: 1
+  maxTextureSizeSet: 0
+  compressionQualitySet: 0
+  textureFormatSet: 0
+  platformSettings:
+  - buildTarget: DefaultTexturePlatform
+    maxTextureSize: 2048
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+  spriteSheet:
+    serializedVersion: 2
+    sprites: []
+    outline: []
+  spritePackingTag: 
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

BIN
Assets/Resources/Sprite/SpriteUI/游戏返回按钮·左上角.png


+ 68 - 0
Assets/Resources/Sprite/SpriteUI/游戏返回按钮·左上角.png.meta

@@ -0,0 +1,68 @@
+fileFormatVersion: 2
+guid: 1a54fd35ff8e5224ca011a412abf11b1
+timeCreated: 1490879779
+licenseType: Pro
+TextureImporter:
+  fileIDToRecycleName: {}
+  serializedVersion: 4
+  mipmaps:
+    mipMapMode: 0
+    enableMipMap: 0
+    sRGBTexture: 1
+    linearTexture: 0
+    fadeOut: 0
+    borderMipMap: 0
+    mipMapFadeDistanceStart: 1
+    mipMapFadeDistanceEnd: 3
+  bumpmap:
+    convertToNormalMap: 0
+    externalNormalMap: 0
+    heightScale: 0.25
+    normalMapFilter: 0
+  isReadable: 0
+  grayScaleToAlpha: 0
+  generateCubemap: 6
+  cubemapConvolution: 0
+  seamlessCubemap: 0
+  textureFormat: 1
+  maxTextureSize: 2048
+  textureSettings:
+    filterMode: -1
+    aniso: -1
+    mipBias: -1
+    wrapMode: 1
+  nPOTScale: 0
+  lightmap: 0
+  compressionQuality: 50
+  spriteMode: 1
+  spriteExtrude: 1
+  spriteMeshType: 1
+  alignment: 0
+  spritePivot: {x: 0.5, y: 0.5}
+  spriteBorder: {x: 0, y: 0, z: 0, w: 0}
+  spritePixelsToUnits: 100
+  alphaUsage: 1
+  alphaIsTransparency: 1
+  spriteTessellationDetail: -1
+  textureType: 8
+  textureShape: 1
+  maxTextureSizeSet: 0
+  compressionQualitySet: 0
+  textureFormatSet: 0
+  platformSettings:
+  - buildTarget: DefaultTexturePlatform
+    maxTextureSize: 2048
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+  spriteSheet:
+    serializedVersion: 2
+    sprites: []
+    outline: []
+  spritePackingTag: 
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

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

@@ -10,7 +10,7 @@
   <MiniTimer value="0" />
   <CircleTimer value="10" />
   <CoinPerson value="0" />
-  <PlantList SlotA1="1" SlotA2="2" SlotA3="3" SlotA4="4" SlotA5="5" SlotA6="6" SlotA7="7" SlotA8="8" SlotA9="9" />
+  <PlantList SlotA1="0" SlotA2="1" SlotA3="2" SlotA4="3" SlotA5="4" SlotA6="5" SlotA7="6" />
   <FlowerList ID="1 2 3 4 5 6 7 8 9 10" />
   <SkillList>
     <免费获取金币 SkillType="Skill" ItemStatus="Lock" Level="0" CdTimer="0" EffectTimer="0" />

+ 1 - 8
Assets/Resources/XML/Config/signin_config.xml

@@ -19,14 +19,7 @@
   <item id="18" flower="" diamond="" coin="7000" />
   <item id="19" flower="" diamond="" coin="8000" />
   <item id="20" flower="" diamond="" coin="8000" />
-  <item id="21" flower="" diamond="300" coin="" />
-  <item id="22" flower="" diamond="" coin="9000" />
-  <item id="23" flower="" diamond="" coin="9000" />
-  <item id="24" flower="" diamond="" coin="10000" />
-  <item id="25" flower="" diamond="" coin="10000" />
-  <item id="26" flower="" diamond="" coin="12000" />
-  <item id="27" flower="" diamond="" coin="12000" />
-  <item id="28" flower="21,22,23,24,25,26,27" diamond="500" coin="" />
+  <item id="28" flower="21,22,23,24,25,26,27" diamond="400" coin="" />
   <comment>
     <id>
 id

+ 6 - 2
Assets/Script/Manage/Initializer.cs

@@ -24,8 +24,12 @@ public class Initializer : MonoBehaviour
         {
             gameObject.AddScript<Bundle>();
         }
-           
-	    gameObject.AddScript<Auxiliary>();
+
+        if (Auxiliary.Instance == null)
+        {
+            gameObject.AddScript<Auxiliary>();
+        }
+
         gameObject.AddScript<ManaReso>();
         gameObject.AddScript<ManaAnim>();
         gameObject.AddScript<ManaAudio>();

+ 292 - 0
Assets/Script/Manage/ManaAnim.cs

@@ -31,6 +31,7 @@ public class ManaAnim : Regist
     public static Dictionary<Curve, CurveFunctionV> FunctionDicV;
     
     public static Dictionary<Transform, MoveVec> MoveVecDic;
+    public static Dictionary<Transform, TweenSr> TweenSrDic;
     public static Dictionary<Transform, TweenCG> TweenCgDic;
     public static Dictionary<Transform, TweenGra> TweenGraDic;
     public static Dictionary<Transform, TweenVec> TweenVecDic;
@@ -79,6 +80,7 @@ public class ManaAnim : Regist
         FunctionDicV = new Dictionary<Curve, CurveFunctionV>();
 
         MoveVecDic = new Dictionary<Transform, MoveVec>();
+        TweenSrDic = new Dictionary<Transform, TweenSr>();
         TweenCgDic = new Dictionary<Transform, TweenCG>();
         TweenGraDic = new Dictionary<Transform, TweenGra>();
         TweenVecDic = new Dictionary<Transform, TweenVec>();
@@ -167,6 +169,20 @@ public class ManaAnim : Regist
     }
 
 
+    public static void TweenForSr(Transform target)
+    {
+        TweenSr tweenSr;
+
+        if (TweenSrDic.TryGetValue(target, out tweenSr))
+        {
+            tweenSr.StartForward();
+        }
+        else
+        {
+            throw new Exception();
+        }
+    }
+
     public static void TweenForCG(Transform target)
     {
         TweenCG tweenCG;
@@ -252,6 +268,20 @@ public class ManaAnim : Regist
     }
 
 
+    public static void TweenBacSr(Transform target)
+    {
+        TweenSr tweenSr;
+
+        if (TweenSrDic.TryGetValue(target, out tweenSr))
+        {
+            tweenSr.StartBackward();
+        }
+        else
+        {
+            throw new Exception();
+        }
+    }
+
     public static void TweenBacCG(Transform target)
     {
         TweenCG tweenCG;
@@ -336,6 +366,204 @@ public class ManaAnim : Regist
         }
     }
 
+
+    public static void TweenConForSr(Transform target)
+    {
+        TweenSr tweenSr;
+
+        if (TweenSrDic.TryGetValue(target, out tweenSr))
+        {
+            tweenSr.ConfineForward();
+        }
+        else
+        {
+            throw new Exception();
+        }
+    }
+
+    public static void TweenConForCG(Transform target)
+    {
+        TweenCG tweenCG;
+
+        if (TweenCgDic.TryGetValue(target, out tweenCG))
+        {
+            tweenCG.ConfineForward();
+        }
+        else
+        {
+            throw new Exception();
+        }
+    }
+
+    public static void TweenConForGra(Transform target)
+    {
+        TweenGra tweenGra;
+
+        if (TweenGraDic.TryGetValue(target, out tweenGra))
+        {
+            tweenGra.ConfineForward();
+        }
+        else
+        {
+            throw new Exception();
+        }
+    }
+
+    public static void TweenConForVec(Transform target)
+    {
+        TweenVec tweenVec;
+
+        if (TweenVecDic.TryGetValue(target, out tweenVec))
+        {
+            tweenVec.ConfineForward();
+        }
+        else
+        {
+            throw new Exception();
+        }
+    }
+
+    public static void TweenConForRect(Transform target)
+    {
+        TweenRect tweenRect;
+
+        if (TweenRectDic.TryGetValue(target, out tweenRect))
+        {
+            tweenRect.ConfineForward();
+        }
+        else
+        {
+            throw new Exception();
+        }
+    }
+
+    public static void TweenConForScale(Transform target)
+    {
+        TweenScale tweenScale;
+
+        if (TweenScaleDic.TryGetValue(target, out tweenScale))
+        {
+            tweenScale.ConfineForward();
+        }
+        else
+        {
+            throw new Exception();
+        }
+    }
+
+    public static void TweenConForAudio(Transform target)
+    {
+        TweenAudio tween;
+
+        if (TweenAudioDic.TryGetValue(target, out tween))
+        {
+            tween.ConfineForward();
+        }
+        else
+        {
+            throw new Exception();
+        }
+    }
+
+
+    public static void TweenConBacSr(Transform target)
+    {
+        TweenSr tweenSr;
+
+        if (TweenSrDic.TryGetValue(target, out tweenSr))
+        {
+            tweenSr.ConfineBackward();
+        }
+        else
+        {
+            throw new Exception();
+        }
+    }
+
+    public static void TweenConBacCG(Transform target)
+    {
+        TweenCG tweenCG;
+
+        if (TweenCgDic.TryGetValue(target, out tweenCG))
+        {
+            tweenCG.ConfineBackward();
+        }
+        else
+        {
+            throw new Exception();
+        }
+    }
+
+    public static void TweenConBacGra(Transform target)
+    {
+        TweenGra tweenGra;
+
+        if (TweenGraDic.TryGetValue(target, out tweenGra))
+        {
+            tweenGra.ConfineBackward();
+        }
+        else
+        {
+            throw new Exception(target.name);
+        }
+    }
+
+    public static void TweenConBacVec(Transform target)
+    {
+        TweenVec tweenVec;
+
+        if (TweenVecDic.TryGetValue(target, out tweenVec))
+        {
+            tweenVec.ConfineBackward();
+        }
+        else
+        {
+            throw new Exception(target.name);
+        }
+    }
+
+    public static void TweenConBacRect(Transform target)
+    {
+        TweenRect tweenRect;
+
+        if (TweenRectDic.TryGetValue(target, out tweenRect))
+        {
+            tweenRect.ConfineBackward();
+        }
+        else
+        {
+            throw new Exception();
+        }
+    }
+
+    public static void TweenConBacScale(Transform target)
+    {
+        TweenScale tweenScale;
+
+        if (TweenScaleDic.TryGetValue(target, out tweenScale))
+        {
+            tweenScale.ConfineBackward();
+        }
+        else
+        {
+            throw new Exception();
+        }
+    }
+
+    public static void TweenConBacAudio(Transform target)
+    {
+        TweenAudio tween;
+
+        if (TweenAudioDic.TryGetValue(target, out tween))
+        {
+            tween.ConfineBackward();
+        }
+        else
+        {
+            throw new Exception();
+        }
+    }
+
     #endregion
 
     #region 得到动画
@@ -355,6 +583,21 @@ public class ManaAnim : Regist
     }
 
 
+    public static TweenSr GetTweenSr(Transform target)
+    {
+        TweenSr tweenSr;
+
+        if (TweenSrDic.TryGetValue(target, out tweenSr))
+        {
+            return tweenSr;
+        }
+        else
+        {
+            throw new Exception();
+        }
+    }
+
+
     public static TweenCG GetTweenCG(Transform target)
     {
         TweenCG tweenCG;
@@ -464,6 +707,55 @@ public class ManaAnim : Regist
     }
 
 
+    public static TweenSr CreateTweenSr(Transform target, Color origin, Color destination, float duration, bool originActive, bool destActive, Curve curve)
+    {
+        if (TweenSrDic.ContainsKey(target))
+        {
+            SpriteRenderer sr = target.GetComponent<SpriteRenderer>();
+
+            TweenSr tween = TweenSrDic[target];
+
+            tween = new TweenSr(sr, origin, destination, duration, originActive, destActive, curve);
+
+            return tween;
+        }
+        else
+        {
+            SpriteRenderer sr = target.GetComponent<SpriteRenderer>();
+
+            TweenSr tween = new TweenSr(sr, origin, destination, duration, originActive, destActive, curve);
+
+            TweenSrDic.Add(target, tween);
+
+            return tween;
+        }
+    }
+
+    public static TweenSr CreateTweenSr(Transform target, Color destination, float duration, bool originActive, bool destActive, Curve curve)
+    {
+        if (TweenSrDic.ContainsKey(target))
+        {
+            SpriteRenderer sr = target.GetComponent<SpriteRenderer>();
+
+            TweenSr tween = TweenSrDic[target];
+
+            tween = new TweenSr(sr, sr.color, destination, duration, originActive, destActive, curve);
+
+            return tween;
+        }
+        else
+        {
+            SpriteRenderer sr = target.GetComponent<SpriteRenderer>();
+
+            TweenSr tween = new TweenSr(sr, sr.color, destination, duration, originActive, destActive, curve);
+
+            TweenSrDic.Add(target, tween);
+
+            return tween;
+        }
+    }
+
+
     public static TweenCG CreateTweenCG(Transform target, float origin, float destination,  float duration, bool originActive, bool destActive, Curve curve)
     {
         if (TweenCgDic.ContainsKey(target))

+ 47 - 0
Assets/Script/Manage/ManaGarden.cs

@@ -9,6 +9,8 @@ using System.Linq;
 using System.Collections;
 using System.Collections.Generic;
 
+using Random = UnityEngine.Random;
+
 public class ManaGarden : Regist
 {
     #region 变量
@@ -79,6 +81,10 @@ public class ManaGarden : Regist
     private static int _TotalFlowerSpec;
     private static int _TotalFlowerRegu;
 
+    public static bool Award;
+    public static bool AwardLock;
+    public static float AwardTimer;
+
     public static Slot SeleSlot;
     public static FlowerInfo SeleFlowerInfo;
 
@@ -88,6 +94,43 @@ public class ManaGarden : Regist
 
     #endregion
 
+    public void FixedUpdate()
+    {
+        if (Award && !AwardLock)
+        {
+            AwardTimer -= Time.fixedDeltaTime;
+
+            if (AwardTimer <= 0)
+            {
+                List<Flower> spareList = new List<Flower>();
+
+                for (int i = 0; i < PlantList.Count; i++)
+                {
+                    if (PlantList[i].Flower.Award == false)
+                    {
+                        spareList.Add(PlantList[i].Flower);
+                    }
+                }
+
+                if (spareList.Count == 1)
+                {
+                    Award = false;
+
+                    spareList[0].Award = true;
+
+                    AwardTimer = Random.Range(20, 60);
+                }
+                else
+                {
+                    spareList.Random().Award = true;
+
+                    AwardTimer = Random.Range(20, 60);
+                }
+            }
+        }
+    }
+
+
     public override void Instantiate()
     {
         ManaReso.Get("Garden", Folder.Garden, true, transform, true).AddScript<Garden>();
@@ -121,6 +164,10 @@ public class ManaGarden : Regist
 
     public override void RegistValueA()
     {
+        Award = true;
+        AwardLock = false;
+        AwardTimer = Random.Range(20, 60);
+
         SlotList = new List<Slot>()
         {
             ManaReso.Get("SlotA1").AddComponent<Slot>(),

+ 8 - 4
Assets/Script/Manage/ManaMiniGame.cs

@@ -212,8 +212,8 @@ public class ManaMiniGame : Regist
         {
             _GameTimer = value;
 
-            TimerBk.fillAmount = _GameTimer / GameTimer;
-
+            TimerIcon.fillAmount = _GameTimer / GameTime;
+            
             TimerLab.text = _GameTimer.ToString("0.0");
         }
     }
@@ -240,7 +240,7 @@ public class ManaMiniGame : Regist
 
     public static Text BtnLab;
     public static Text TimerLab;
-    public static Image TimerBk;
+    public static Image TimerIcon;
     public static Award Award;
     public static List<Flower> OpList;
     public static List<Flower> IdleList;
@@ -326,7 +326,7 @@ public class ManaMiniGame : Regist
 
     public override void RegistReference()
     {
-        TimerBk = ManaReso.Get<Image>("D_TimerIcon");
+        TimerIcon = ManaReso.Get<Image>("D_TimerIcon");
 
         BtnLab = ManaReso.Get<Text>("D_BeginLab");
         TimerLab = ManaReso.Get<Text>("D_TimerLab");
@@ -455,6 +455,8 @@ public class ManaMiniGame : Regist
 
     public static void GameAbort()
     {
+        ManaGarden.AwardLock = false;
+
         if (Game)
         {
             ManaData.Mini = false;
@@ -496,6 +498,8 @@ public class ManaMiniGame : Regist
 
     public static void GamePrepare()
     {
+        ManaGarden.AwardLock = true;
+
         OpList = new List<Flower>();
         IdleList = new List<Flower>();
         IdleList.Add(ManaReso.GetFlower(ManaGarden.FlowerInfoList[0], ManaReso.Get("SlotMini1")));

+ 2 - 0
Assets/Script/Manage/ManaReso.cs

@@ -221,6 +221,7 @@ public class ManaReso : Regist
         }
         else
         {
+            flower.GoldBk.SetActive(false);
             flower.transform.localPosition = flower.LocalPos;
         }
 
@@ -247,6 +248,7 @@ public class ManaReso : Regist
         }
         else
         {
+            flower.GoldBk.SetActive(false);
             flower.transform.localPosition = flower.LocalPos;
         }
 

+ 27 - 3
Assets/Script/Manage/ManaUI.cs

@@ -80,7 +80,7 @@ public class Sign
                 {
                     ManaGarden.FlowerInfoList[FlowerList[i]].Unlock = true;
 
-                    if (ManaData.Sign < 27)
+                    if (ManaData.Sign < 20)
                     {
                         ManaData.Sign++;
                     }
@@ -314,7 +314,6 @@ public class ManaUI : Regist
 
         #region D
 
-        ManaReso.SetText("D_QuitLab");
         ManaReso.SetText("D_ScoreTit");
 
         ManaReso.SetText("D_BeginLab", Language.GetStr("UI", "D_BeginLab0"));
@@ -642,14 +641,24 @@ public class ManaUI : Regist
         );
 
         #endregion
-        
+
         #region F_TabBtn
 
+        ManaReso.Get("F_Elf").CreateTweenScale(new Vector3(1, 1, 1), new Vector3(1.1f, 1.1f, 1.1f), 0.25f, true, true, Curve.EaseOutQuad);
+        ManaReso.Get("F_Store").CreateTweenScale(new Vector3(1, 1, 1), new Vector3(1.1f, 1.1f, 1.1f), 0.25f, true, true, Curve.EaseOutQuad);
+        ManaReso.Get("F_Magic").CreateTweenScale(new Vector3(1, 1, 1), new Vector3(1.1f, 1.1f, 1.1f), 0.25f, true, true, Curve.EaseOutQuad);
+        ManaReso.Get("F_Garden").CreateTweenScale(new Vector3(1, 1, 1), new Vector3(1.1f, 1.1f, 1.1f), 0.25f, true, true, Curve.EaseOutQuad);
+
         ManaReso.AddButtonEvent
         (
             "F_Elf",
             () =>
             {
+                ManaReso.Get("F_Elf").TweenForScale();
+                ManaReso.Get("F_Store").TweenConBacScale();
+                ManaReso.Get("F_Magic").TweenConBacScale();
+                ManaReso.Get("F_Garden").TweenConBacScale();
+
                 ManaReso.Get("F_Elf").SetAsLastSibling();
                 ManaReso.Get("F_Store").SetSiblingIndex(0);
                 ManaReso.Get("F_Magic").SetSiblingIndex(1);
@@ -674,6 +683,11 @@ public class ManaUI : Regist
             "F_Store",
             () =>
             {
+                ManaReso.Get("F_Elf").TweenConBacScale();
+                ManaReso.Get("F_Store").TweenForScale();
+                ManaReso.Get("F_Magic").TweenConBacScale();
+                ManaReso.Get("F_Garden").TweenConBacScale();
+
                 ManaReso.Get("F_Elf").SetSiblingIndex(1);
                 ManaReso.Get("F_Store").SetAsLastSibling();
                 ManaReso.Get("F_Magic").SetSiblingIndex(0);
@@ -698,6 +712,11 @@ public class ManaUI : Regist
             "F_Magic",
             () =>
             {
+                ManaReso.Get("F_Elf").TweenConBacScale();
+                ManaReso.Get("F_Store").TweenConBacScale();
+                ManaReso.Get("F_Magic").TweenForScale();
+                ManaReso.Get("F_Garden").TweenConBacScale();
+
                 ManaReso.Get("F_Elf").SetSiblingIndex(1);
                 ManaReso.Get("F_Store").SetSiblingIndex(0);
                 ManaReso.Get("F_Magic").SetAsLastSibling();
@@ -722,6 +741,11 @@ public class ManaUI : Regist
             "F_Garden",
             () =>
             {
+                ManaReso.Get("F_Elf").TweenConBacScale();
+                ManaReso.Get("F_Store").TweenConBacScale();
+                ManaReso.Get("F_Magic").TweenConBacScale();
+                ManaReso.Get("F_Garden").TweenForScale();
+
                 ManaReso.Get("F_Elf").SetSiblingIndex(2);
                 ManaReso.Get("F_Store").SetSiblingIndex(0);
                 ManaReso.Get("F_Magic").SetSiblingIndex(1);

+ 63 - 2
Assets/Script/Object/Flower.cs

@@ -160,6 +160,23 @@ public class Flower : ObjRoot, IPointerClickHandler
 
     #endregion
 
+    public bool Award
+    {
+        get { return _Award; }
+        set
+        {
+            _Award = value;
+
+            if (_Award)
+            {
+                ShowAward();
+            }
+            else
+            {
+                GetAward();
+            }
+        }
+    }
     public FlowerInfo FlowerInfo
     {
         get { return _FlowerInfo; }
@@ -171,11 +188,14 @@ public class Flower : ObjRoot, IPointerClickHandler
         }
     }
 
+    public bool _Award;
     private FlowerInfo _FlowerInfo;
 
     public int Id;
     public Slot Slot;
     public Vector3 LocalPos;
+    public Transform GoldBk;
+    public Transform GoldIcon;
 
     private Dictionary<string, Transform> ChildDic;
 
@@ -187,7 +207,9 @@ public class Flower : ObjRoot, IPointerClickHandler
         
         Auxiliary.CompileDic(transform, ChildDic);
 
+        GoldBk = ChildDic["GoldBk"];
         FlowerSr = ChildDic["FlowerIcon"].GetComponent<SpriteRenderer>();
+        GoldIcon = ChildDic["GoldIcon"];
         OperateIcon = ChildDic["OperateIcon"].GetComponent<SpriteRenderer>();
     }
 
@@ -283,10 +305,49 @@ public class Flower : ObjRoot, IPointerClickHandler
     #endregion
 
 
+    public void GetAward()
+    {
+        ManaGarden.Award = true;
+
+        int coin = Mathf.CeilToInt(ManaData.CoinPerson*Random.Range(0.05f, 0.08f)*ManaData.SkillPlus);
+
+        ManaData.Coin += coin;
+
+        ManaReso.GetHudText("+" + coin, Color.red, 18, ChildDic["GoldTra"], ManaReso.Get("A_HudParent"), true);
+
+        GoldBk.SetActive(false);
+    }
+
+    public void ShowAward()
+    {
+        GoldBk.CreateTweenSr(new Color(1, 1, 1, 0), new Color(1, 1, 1, 1), 1f, true, true, Curve.EaseOutQuad);
+        GoldIcon.CreateTweenSr(new Color(1, 1, 1, 0), new Color(1, 1, 1, 1), 1f, true, true, Curve.EaseOutQuad);
+
+        GoldBk.SetY(transform.position.y + 2.5f);
+
+        GoldBk.TweenForSr();
+        GoldIcon.TweenForSr();
+
+        GoldBk.MoveVec
+        (
+            GoldBk.transform.position + new Vector3(0, 0.5f, 0),
+            1f,
+            Curve.EaseOutQuad
+        );
+    }
+
+
     public void OnPointerClick(PointerEventData eventData)
     {
-        ManaReso.Get("G_Flower").TweenForCG();
+        if (eventData.rawPointerPress.transform == transform)
+        {
+            ManaReso.Get("G_Flower").TweenForCG();
 
-        ManaGarden.ShowRetrieveCard(FlowerInfo);
+            ManaGarden.ShowRetrieveCard(FlowerInfo);
+        }
+        else if (eventData.rawPointerPress.transform == GoldBk)
+        {
+            Award = false;
+        }
     }
 }

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

@@ -386,7 +386,7 @@ public class Garden : Regist, IDragHandler, IPointerClickHandler, IEndDragHandle
             {
                 ManaGarden.ShowPlantCard(slot, flowerInfo);
 
-                Auxiliary.Inst.DelayCall
+                Auxiliary.Instance.DelayCall
                 (
                     () =>
                     {

+ 24 - 0
Assets/Script/Tool/Anim/Tween.cs

@@ -6,6 +6,9 @@ using System.Collections;
 
 public abstract class Tween 
 {
+    public bool InForward;
+    public bool InBackward;
+
     public bool IsForward;
     public bool IsBackward;
     public UnityAction OnForwardStart;
@@ -23,9 +26,28 @@ public abstract class Tween
     public abstract bool DoBackward();
 
 
+    public void ConfineForward()
+    {
+        if (InForward)
+        {
+            StartForward();
+        }
+    }
+
+    public void ConfineBackward()
+    {
+        if (InBackward)
+        {
+            StartBackward();
+        }
+    }
+
+
     public virtual void StartForward()
     {
         IsForward = true;
+        InForward = false;
+
         OnForwardStart.Invoke();
 
         ManaAnim.TweenForList.Add(this);
@@ -35,6 +57,8 @@ public abstract class Tween
     public virtual void StartBackward()
     {
         IsBackward = true;
+        InBackward = false;
+
         OnBackwardStart.Invoke();
 
         ManaAnim.TweenForList.Remove(this);

+ 19 - 0
Assets/Script/Tool/Anim/TweenAudio.cs

@@ -17,6 +17,15 @@ public class TweenAudio : Tween
 
     public TweenAudio(AudioSource target, float origin, float destination, float duration, bool originActive, bool destActive, Curve curve)
     {
+        if (Math.Abs(target.volume - origin) < 0.0005f)
+        {
+            InForward = true;
+        }
+        else if (Math.Abs(target.volume - destination) < 0.0005f)
+        {
+            InBackward = true;
+        }
+
         Func = ManaAnim.FunctionDicF[curve];
         Target = target;
 
@@ -58,6 +67,10 @@ public class TweenAudio : Tween
         {
             Timer = Duration - Timer;
         }
+        else
+        {
+            Target.volume = Origin;
+        }
     }
 
     public override void StartBackward()
@@ -68,6 +81,10 @@ public class TweenAudio : Tween
         {
             Timer = Duration - Timer;
         }
+        else
+        {
+            Target.volume = Destination;
+        }
     }
 
     public override bool DoForward()
@@ -81,6 +98,7 @@ public class TweenAudio : Tween
             Target.volume = Destination;
 
             IsForward = false;
+            InBackward = true;
 
             OnForwardFinish.Invoke();
 
@@ -107,6 +125,7 @@ public class TweenAudio : Tween
             Target.volume = Origin;
 
             IsBackward = false;
+            InForward = true;
 
             OnBackwardFinish.Invoke();
 

+ 19 - 0
Assets/Script/Tool/Anim/TweenCG.cs

@@ -17,6 +17,15 @@ public class TweenCG : Tween
 
     public TweenCG(CanvasGroup target, float origin, float destination, float duration, bool originActive, bool destActive, Curve curve)
     {
+        if (Math.Abs(target.alpha - origin) < 0.0005f)
+        {
+            InForward = true;
+        }
+        else if (Math.Abs(target.alpha - destination) < 0.0005f)
+        {
+            InBackward = true;
+        }
+
         Func = ManaAnim.FunctionDicF[curve];
         Target = target;
 
@@ -63,6 +72,10 @@ public class TweenCG : Tween
         {
             Timer = Duration - Timer;
         }
+        else
+        {
+            Target.alpha = Origin;
+        }
     }
 
     public override void StartBackward()
@@ -73,6 +86,10 @@ public class TweenCG : Tween
         {
             Timer = Duration - Timer;
         }
+        else
+        {
+            Target.alpha = Destination;
+        }
     }
 
     public override bool DoForward()
@@ -86,6 +103,7 @@ public class TweenCG : Tween
             Target.alpha = Destination;
 
             IsForward = false;
+            InBackward = true;
 
             OnForwardFinish.Invoke();
 
@@ -112,6 +130,7 @@ public class TweenCG : Tween
             Target.alpha = Origin;
 
             IsBackward = false;
+            InForward = true;
 
             OnBackwardFinish.Invoke();
 

+ 19 - 0
Assets/Script/Tool/Anim/TweenGra.cs

@@ -18,6 +18,15 @@ public class TweenGra : Tween
 
     public TweenGra(Graphic target, Color origin, Color destination, float duration, bool originActive, bool destActive, Curve curve)
     {
+        if (target.color == origin)
+        {
+            InForward = true;
+        }
+        else if (target.color == destination)
+        {
+            InBackward = true;
+        }
+
         Func = ManaAnim.FunctionDicC[curve];
         Target = target;
 
@@ -60,6 +69,10 @@ public class TweenGra : Tween
         {
             Timer = Duration - Timer;
         }
+        else
+        {
+            Target.color = Origin;
+        }
     }
 
     public override void StartBackward()
@@ -70,6 +83,10 @@ public class TweenGra : Tween
         {
             Timer = Duration - Timer;
         }
+        else
+        {
+            Target.color = Destination;
+        }
     }
 
     public override bool DoForward()
@@ -83,6 +100,7 @@ public class TweenGra : Tween
             Target.color = Destination;
 
             IsForward = false;
+            InBackward = true;
 
             OnForwardFinish.Invoke();
 
@@ -109,6 +127,7 @@ public class TweenGra : Tween
             Target.color = Origin;
 
             IsBackward = false;
+            InForward = true;
 
             OnBackwardFinish.Invoke();
 

+ 20 - 1
Assets/Script/Tool/Anim/TweenRect.cs

@@ -15,8 +15,17 @@ public class TweenRect : Tween
 
     #endregion
 
-    public TweenRect(RectTransform target, Vector3 origin, Vector3 destination, float duration, bool originActive, bool destActive, Curve curve)
+    public TweenRect(RectTransform target, Vector2 origin, Vector2 destination, float duration, bool originActive, bool destActive, Curve curve)
     {
+        if (target.sizeDelta == origin)
+        {
+            InForward = true;
+        }
+        else if (target.sizeDelta == destination)
+        {
+            InBackward = true;
+        }
+
         CG = target.GetComponent<CanvasGroup>();
         Func = ManaAnim.FunctionDicV[curve];
         Target = target;
@@ -80,6 +89,10 @@ public class TweenRect : Tween
         {
             Timer = Duration - Timer;
         }
+        else
+        {
+            Target.sizeDelta = Origin;
+        }
     }
 
     public override void StartBackward()
@@ -90,6 +103,10 @@ public class TweenRect : Tween
         {
             Timer = Duration - Timer;
         }
+        else
+        {
+            Target.sizeDelta = Destination;
+        }
     }
 
     public override bool DoForward()
@@ -103,6 +120,7 @@ public class TweenRect : Tween
             Target.sizeDelta = Destination;
 
             IsForward = false;
+            InBackward = true;
 
             OnForwardFinish.Invoke();
 
@@ -129,6 +147,7 @@ public class TweenRect : Tween
             Target.sizeDelta = Origin;
 
             IsBackward = false;
+            InForward = true;
 
             OnBackwardFinish.Invoke();
 

+ 19 - 0
Assets/Script/Tool/Anim/TweenScale.cs

@@ -18,6 +18,15 @@ public class TweenScale : Tween
 
     public TweenScale(Transform target, Vector3 origin, Vector3 destination, float duration, bool originActive, bool destActive, Curve curve)
     {
+        if (target.localScale == origin)
+        {
+            InForward = true;
+        }
+        else if (target.localScale == destination)
+        {
+            InBackward = true;
+        }
+
         CG = target.GetComponent<CanvasGroup>();
         Func = ManaAnim.FunctionDicV[curve];
         Target = target;
@@ -82,6 +91,10 @@ public class TweenScale : Tween
         {
             Timer = Duration - Timer;
         }
+        else
+        {
+            Target.localScale = Origin;
+        }
     }
 
     public override void StartBackward()
@@ -92,6 +105,10 @@ public class TweenScale : Tween
         {
             Timer = Duration - Timer;
         }
+        else
+        {
+            Target.localScale = Destination;
+        }
     }
 
     public override bool DoForward()
@@ -105,6 +122,7 @@ public class TweenScale : Tween
             Target.localScale = Destination;
 
             IsForward = false;
+            InBackward = true;
 
             OnForwardFinish.Invoke();
 
@@ -131,6 +149,7 @@ public class TweenScale : Tween
             Target.localScale = Origin;
 
             IsBackward = false;
+            InForward = true;
 
             OnBackwardFinish.Invoke();
 

+ 143 - 0
Assets/Script/Tool/Anim/TweenSr.cs

@@ -0,0 +1,143 @@
+using UnityEngine;
+
+using System.Collections;
+
+public class TweenSr : Tween 
+{
+    #region 变量
+
+    protected Color Delta;
+    protected Color Origin;
+    protected Color Destination;
+    protected SpriteRenderer Target;
+    protected CurveFunctionC Func;
+
+    #endregion
+
+    public TweenSr(SpriteRenderer target, Color origin, Color destination, float duration, bool originActive, bool destActive, Curve curve)
+    {
+        if (target.color == origin)
+        {
+            InForward = true;
+        }
+        else if (target.color == destination)
+        {
+            InBackward = true;
+        }
+
+        Func = ManaAnim.FunctionDicC[curve];
+        Target = target;
+
+        IsForward = false;
+        IsBackward = false;
+
+        Delta = destination - origin;
+        Origin = origin;
+        Duration = duration;
+        DestActive = destActive;
+        Destination = destination;
+        OriginActive = originActive;
+
+        OnForwardStart += () =>
+        {
+            Target.SetActive(true);
+        };
+
+        OnForwardFinish += () =>
+        {
+            Target.SetActive(DestActive);
+        };
+
+        OnBackwardStart += () =>
+        {
+            Target.SetActive(true);
+        };
+
+        OnBackwardFinish += () =>
+        {
+            Target.SetActive(OriginActive);
+        };
+    }
+
+    public override void StartForward()
+    {
+        base.StartForward();
+
+        if (IsBackward)
+        {
+            Timer = Duration - Timer;
+        }
+        else
+        {
+            Target.color = Origin;
+        }
+    }
+
+    public override void StartBackward()
+    {
+        base.StartBackward();
+
+        if (IsForward)
+        {
+            Timer = Duration - Timer;
+        }
+        else
+        {
+            Target.color = Destination;
+        }
+    }
+
+    public override bool DoForward()
+    {
+        Timer += Time.fixedDeltaTime;
+
+        if (Timer > Duration)
+        {
+            Timer = 0;
+
+            Target.color = Destination;
+
+            IsForward = false;
+            InBackward = true;
+
+            OnForwardFinish.Invoke();
+
+            ManaAnim.TweenForList.Remove(this);
+
+            return true;
+        }
+        else
+        {
+            Target.color = Func(Timer, Duration, Origin, Delta);
+
+            return false;
+        }
+    }
+
+    public override bool DoBackward()
+    {
+        Timer += Time.fixedDeltaTime;
+
+        if (Timer > Duration)
+        {
+            Timer = 0;
+
+            Target.color = Origin;
+
+            IsBackward = false;
+            InForward = true;
+
+            OnBackwardFinish.Invoke();
+
+            ManaAnim.TweenBacList.Remove(this);
+
+            return true;
+        }
+        else
+        {
+            Target.color = Func(Timer, Duration, Destination, new Color(-Delta.r, -Delta.g, -Delta.b, -Delta.a));
+
+            return false;
+        }
+    }
+}

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

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

+ 19 - 0
Assets/Script/Tool/Anim/TweenVec.cs

@@ -18,6 +18,15 @@ public class TweenVec : Tween
 
     public TweenVec(Transform target, Vector3 origin, Vector3 destination, float duration, bool originActive, bool destActive, Curve curve)
     {
+        if (target.position == origin)
+        {
+            InForward = true;
+        }
+        else if (target.position == destination)
+        {
+            InBackward = true;
+        }
+
         CG = target.GetComponent<CanvasGroup>();
         Func = ManaAnim.FunctionDicV[curve];
         Target = target;
@@ -81,6 +90,10 @@ public class TweenVec : Tween
         {
             Timer = Duration - Timer;
         }
+        else
+        {
+            Target.position = Origin;
+        }
     }
 
     public override void StartBackward()
@@ -91,6 +104,10 @@ public class TweenVec : Tween
         {
             Timer = Duration - Timer;
         }
+        else
+        {
+            Target.position = Destination;
+        }
     }
 
     public override bool DoForward()
@@ -104,6 +121,7 @@ public class TweenVec : Tween
             Target.position = Destination;
 
             IsForward = false;
+            InBackward = true;
 
             OnForwardFinish.Invoke();
 
@@ -130,6 +148,7 @@ public class TweenVec : Tween
             Target.position = Origin;
 
             IsBackward = false;
+            InForward = true;
 
             OnBackwardFinish.Invoke();
 

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

@@ -26,7 +26,7 @@ public class Auxiliary : MonoBehaviour
 
     public static bool AnyKeyUp;
     public static bool AnyKeyDown;
-    public static Auxiliary Inst;
+    public static Auxiliary Instance;
 
     public static MD5 MD5
     {
@@ -62,9 +62,9 @@ public class Auxiliary : MonoBehaviour
 
     #endregion
 
-    private void Start()
+    private void Awake()
     {
-        Inst = this;
+        Instance = this;
     }
 
     private void Update()

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

@@ -5,6 +5,8 @@ using System;
 using System.Collections;
 using System.Collections.Generic;
 
+using Random = UnityEngine.Random;
+
 public static class Extension
 {
     #region List
@@ -14,6 +16,11 @@ public static class Extension
         return list[list.Count - 1 - index];
     }
 
+    public static T Random<T>(this List<T> list)
+    {
+        return list[UnityEngine.Random.Range(0, list.Count)];
+    }
+
     public static bool Valid<T>(this List<T> list)
     {
         if (list == null || list.Count == 0)
@@ -173,6 +180,11 @@ public static class Extension
 
     #region Tween
 
+    public static void TweenForSr(this Component comp)
+    {
+        ManaAnim.TweenForSr(comp.transform);
+    }
+
     public static void TweenForCG(this Component comp)
     {
         ManaAnim.TweenForCG(comp.transform);
@@ -204,6 +216,11 @@ public static class Extension
     }
 
 
+    public static void TweenBacSr(this Component comp)
+    {
+        ManaAnim.TweenBacSr(comp.transform);
+    }
+
     public static void TweenBacCG(this Component comp)
     {
         ManaAnim.TweenBacCG(comp.transform);
@@ -235,6 +252,83 @@ public static class Extension
     }
 
 
+    public static void TweenConForSr(this Component comp)
+    {
+        ManaAnim.TweenConForSr(comp.transform);
+    }
+
+    public static void TweenConForCG(this Component comp)
+    {
+        ManaAnim.TweenConForCG(comp.transform);
+    }
+
+    public static void TweenConForVec(this Component comp)
+    {
+        ManaAnim.TweenConForVec(comp.transform);
+    }
+
+    public static void TweenConForGra(this Component comp)
+    {
+        ManaAnim.TweenConForGra(comp.transform);
+    }
+
+    public static void TweenConForRect(this Component comp)
+    {
+        ManaAnim.TweenConForRect(comp.transform);
+    }
+
+    public static void TweenConForScale(this Component comp)
+    {
+        ManaAnim.TweenConForScale(comp.transform);
+    }
+
+    public static void TweenConForAudio(this Component comp)
+    {
+        ManaAnim.TweenConForAudio(comp.transform);
+    }
+
+
+    public static void TweenConBacSr(this Component comp)
+    {
+        ManaAnim.TweenConBacSr(comp.transform);
+    }
+
+    public static void TweenConBacCG(this Component comp)
+    {
+        ManaAnim.TweenConBacCG(comp.transform);
+    }
+
+    public static void TweenConBacVec(this Component comp)
+    {
+        ManaAnim.TweenConBacVec(comp.transform);
+    }
+
+    public static void TweenConBacGra(this Component comp)
+    {
+        ManaAnim.TweenConBacGra(comp.transform);
+    }
+
+    public static void TweenConBacRect(this Component comp)
+    {
+        ManaAnim.TweenConBacRect(comp.transform);
+    }
+
+    public static void TweenConBacScale(this Component comp)
+    {
+        ManaAnim.TweenConBacScale(comp.transform);
+    }
+
+    public static void TweenConBacAudio(this Component comp)
+    {
+        ManaAnim.TweenConBacAudio(comp.transform);
+    }
+
+
+    public static TweenSr GetTweenSr(this Component comp)
+    {
+        return ManaAnim.GetTweenSr(comp.transform);
+    }
+
     public static TweenCG GetTweenCG(this Component comp)
     {
         return ManaAnim.GetTweenCG(comp.transform);
@@ -266,6 +360,16 @@ public static class Extension
     }
 
 
+    public static TweenSr CreateTweenSr(this Component comp, Color origin, Color destination, float duration, bool originActive, bool destActive, Curve curve)
+    {
+        return ManaAnim.CreateTweenSr(comp.transform, origin, destination, duration, originActive, destActive, curve);
+    }
+
+    public static TweenSr CreateTweenSr(this Component comp, Color destination, float duration, bool originActive, bool destActive, Curve curve)
+    {
+        return ManaAnim.CreateTweenSr(comp.transform, destination, duration, originActive, destActive, curve);
+    }
+
     public static TweenCG CreateTweenCG(this Component comp, float origin, float destination, float duration, bool originActive, bool destActive, Curve curve)
     {
         return ManaAnim.CreateTweenCG(comp.transform, origin, destination, duration, originActive, destActive, curve);

+ 1 - 0
MyLovelyGarden.csproj

@@ -126,6 +126,7 @@
     <Compile Include="Assets\Script\Tool\Anim\TweenGra.cs" />
     <Compile Include="Assets\Script\Tool\Anim\TweenRect.cs" />
     <Compile Include="Assets\Script\Tool\Anim\TweenScale.cs" />
+    <Compile Include="Assets\Script\Tool\Anim\TweenSr.cs" />
     <Compile Include="Assets\Script\Tool\Anim\TweenVec.cs" />
     <Compile Include="Assets\Script\Tool\Auxiliary.cs" />
     <Compile Include="Assets\Script\Tool\Bundle.cs" />

+ 3 - 0
MyLovelyGarden.txt

@@ -1,3 +1,6 @@
+ÃÀÊõÎĵµ
+
+
 ×ÖÌå
 
 Anchor