Browse Source

Update6.7

LiuQilin 8 years ago
parent
commit
1a9a7ec055

BIN
.vs/MyLovelyGarden/v14/.suo


BIN
Assets/Plugins/Android/ShareSDK/libs/ShareSDK-GooglePlus-2.8.2.jar


+ 0 - 8
Assets/Plugins/Android/ShareSDK/libs/ShareSDK-GooglePlus-2.8.2.jar.meta

@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: 5e8971accbc064868ae1e19ed7f1cca8
-timeCreated: 1492482999
-licenseType: Free
-DefaultImporter:
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 15 - 7
Assets/Plugins/ShareSDK/ShareSDK.cs

@@ -21,15 +21,23 @@ namespace cn.sharesdk.unity3d
         public static string WeChatAppKey = "wx4868b35061f87885";
         public static string WeChatSecrete = "64020361b8ec4c99936c0e3999a9f249";
 
-        public static string SinaAppKey = "568898243";
-        public static string SinaAppSecrete = "38a4f8204cc784f81f9f0daaf31e02e3";
+        //public static string SinaAppKey = "568898243";
+        //public static string SinaAppSecrete = "38a4f8204cc784f81f9f0daaf31e02e3";
+        public static string SinaAppKey = "1089133069";
+        public static string SinaAppSecrete = "f44fdbcf346c507cd989ebdbcb8cd251";
 
-	    public static string GoogleClientID = "682795613743-cfo3a8r4va0ujja7qofr54hobt2kv3cq.apps.googleusercontent.com";
-	    public static string GoogleAppKey = "232554794995.apps.googleusercontent.com";
-        public static string GoogleAppSecrete = "PEdFgtrMw97aCvf0joQj7EMk";
+        //public static string GoogleClientID = "682795613743-cfo3a8r4va0ujja7qofr54hobt2kv3cq.apps.googleusercontent.com";
+        //public static string GoogleAppKey = "232554794995.apps.googleusercontent.com";
+        //public static string GoogleAppSecrete = "PEdFgtrMw97aCvf0joQj7EMk";
 
-        public static string FacebookAppKey = "107704292745179";
-        public static string FacebookAppSecrete = "38053202e1a5fe26c80c753071f0b573";
+        public static string GoogleAppKey = "";
+        public static string GoogleAppSecrete = "";
+        public static string GoogleClientID = "839373660096-rekqhoistqv24rvb0luobcfmjbo6gonj.apps.googleusercontent.com";
+
+        //public static string FacebookAppKey = "107704292745179";
+        //public static string FacebookAppSecrete = "38053202e1a5fe26c80c753071f0b573";
+        public static string FacebookAppKey = "1996720443893282";
+        public static string FacebookAppSecrete = "45a70c021b5cdde6f1f82891181d0306";
 
         private int reqID;
 		public DevInfoSet devInfo;

+ 1 - 1
Assets/Plugins/ShareSDK/ShareSDKDevInfo.cs

@@ -7,7 +7,7 @@ namespace cn.sharesdk.unity3d
 	public class DevInfoSet
 	{
 		public Facebook facebook = new Facebook();
-        public GooglePlus googlePlus = new GooglePlus();
+        //public GooglePlus googlePlus = new GooglePlus();
 		public SinaWeiboDevInfo sinaweibo = new SinaWeiboDevInfo();
 
         public QQ qq = new QQ();

BIN
Assets/Resource/Logo.unity


+ 17 - 1
Assets/Resource/Mobile/ICON2.png.meta

@@ -1,6 +1,6 @@
 fileFormatVersion: 2
 guid: b813046556cad144a8d802561e852941
-timeCreated: 1494848738
+timeCreated: 1496817101
 licenseType: Pro
 TextureImporter:
   fileIDToRecycleName: {}
@@ -90,6 +90,22 @@ TextureImporter:
     crunchedCompression: 0
     allowsAlphaSplitting: 0
     overridden: 0
+  - buildTarget: tvOS
+    maxTextureSize: 2048
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+  - buildTarget: Windows Store Apps
+    maxTextureSize: 2048
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
   spriteSheet:
     serializedVersion: 2
     sprites: []

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


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


+ 8 - 0
Assets/Resource/Prefab/Object/Star.prefab.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 8621ee70defbdb049b3c735108378eb1
+timeCreated: 1496825084
+licenseType: Pro
+NativeFormatImporter:
+  userData: 
+  assetBundleName: scene
+  assetBundleVariant: 

+ 10 - 1
Assets/Resource/XML/Config/award_config.xml

@@ -1,5 +1,5 @@
 <data>
-  <item id="1" coin="s*0.01*l" diamond="3,15" diamond_drop="0.5/l+l*0.0001" flower_drop="(1/f+l*0.001)*0.95" flower_rate_based="0.05,0.65,0.95" rate="0,400,650" coin_drop="r*l*0.65" flower_coin="l*0.65" />
+  <item id="1" coin="s*0.01*l" diamond="3,15" diamond_drop="0.5/l+l*0.0001" flower_drop="(1/f+l*0.001)*0.95" flower_rate_based="0.05,0.65,0.95" rate="0,400,650" coin_drop="r*l*0.65" flower_coin="l*0.65" star_cd="5" star_time="3" star_duration="10" />
   <comment>
     <id>
 
@@ -29,5 +29,14 @@ s表示score
     <flower_coin>
 种花金币奖励
 </flower_coin>
+    <star_cd>
+减少小游戏冷却时间
+</star_cd>
+    <star_time>
+每过x秒出现一个star
+</star_time>
+    <star_duration>
+star最大存在时间
+</star_duration>
   </comment>
 </data>

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

@@ -1,5 +1,5 @@
 <PlayerConfig>
-  <Version value="548" />
+  <Version value="555" />
 
   <ID value="Default" />
 ////  <TutorialA value="0" />
@@ -18,8 +18,8 @@
   <Coin value="0" />
   <Diamond value="0" />
   <SignIndex value="1" />
+  <MiniTimer value="180" />
   <SignRound value="1" />
-  <MiniTimer value="0" />
   <CircleTimer value="0" />
   <MiniGameIndex value="0" />
   

+ 5 - 0
Assets/Resource/XML/lan/ChineseSimplified.xml

@@ -183,6 +183,7 @@
     <AchieveItem_BtnLab1 desc=""><![CDATA[领取奖励]]></AchieveItem_BtnLab1>
     <AchieveItem_BtnLab2 desc=""><![CDATA[已完成]]></AchieveItem_BtnLab2>
     <SlotSign desc=""><![CDATA[未开垦]]></SlotSign>
+    <Star desc=""><![CDATA[小游戏冷却时间减少]]></Star>
   </Object>
   <Common>
     <Diamond desc=""><![CDATA[钻石]]></Diamond>
@@ -367,4 +368,8 @@
     <PurchaseUnvalid desc=""><![CDATA[没有找到该商品]]></PurchaseUnvalid>
     <TemporarilyUnavailible desc=""><![CDATA[暂时无法使用]]></TemporarilyUnavailible>
   </IAP>
+  <Plural>
+    <Second desc=""><![CDATA[秒]]></Second>
+    <Seconds desc=""><![CDATA[秒]]></Seconds>
+  </Plural>
 </lan>

+ 5 - 0
Assets/Resource/XML/lan/ChineseTraditional.xml

@@ -183,6 +183,7 @@
     <AchieveItem_BtnLab1 desc=""><![CDATA[領取獎勵]]></AchieveItem_BtnLab1>
     <AchieveItem_BtnLab2 desc=""><![CDATA[已完成]]></AchieveItem_BtnLab2>
     <SlotSign desc=""><![CDATA[未開墾]]></SlotSign>
+    <Star desc=""><![CDATA[小遊戲冷卻時間減少]]></Star>
   </Object>
   <Common>
     <Diamond desc=""><![CDATA[鉆石]]></Diamond>
@@ -367,4 +368,8 @@
     <PurchaseUnvalid desc=""><![CDATA[沒有找到該商品]]></PurchaseUnvalid>
     <TemporarilyUnavailible desc=""><![CDATA[暫時無法使用]]></TemporarilyUnavailible>
   </IAP>
+  <Plural>
+    <Second desc=""><![CDATA[秒]]></Second>
+    <Seconds desc=""><![CDATA[秒]]></Seconds>
+  </Plural>
 </lan>

+ 5 - 0
Assets/Resource/XML/lan/English.xml

@@ -183,6 +183,7 @@ Increase all Coin prudoction by [&coin_person&](permanently)]]></Pack6>
     <AchieveItem_BtnLab1 desc=""><![CDATA[Get Reward]]></AchieveItem_BtnLab1>
     <AchieveItem_BtnLab2 desc=""><![CDATA[Completed]]></AchieveItem_BtnLab2>
     <SlotSign desc=""><![CDATA[Locked]]></SlotSign>
+    <Star desc=""><![CDATA[Reduce minigame cd ]]></Star>
   </Object>
   <Common>
     <Diamond desc=""><![CDATA[Diamond]]></Diamond>
@@ -367,4 +368,8 @@ Increase all Coin prudoction by [&coin_person&](permanently)]]></Pack6>
     <PurchaseUnvalid desc=""><![CDATA[No such product]]></PurchaseUnvalid>
     <TemporarilyUnavailible desc=""><![CDATA[Temporarily unavailible]]></TemporarilyUnavailible>
   </IAP>
+  <Plural>
+    <Second desc=""><![CDATA[ Second]]></Second>
+    <Seconds desc=""><![CDATA[ Seconds]]></Seconds>
+  </Plural>
 </lan>

BIN
Assets/Resource/Xlsx/award_config.xlsx


BIN
Assets/Resource/Xlsx/language_config.xlsx


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

@@ -93,7 +93,10 @@ public class ManaGarden : Regist
     public static int TotalFlower;
     public static bool AwardLock = true;
 
+    public static float StarTime;
+
     public static float ElfTimer;
+    public static float StarTimer;
     public static float AwardTimer;
 
     public static FlowerInfo SeleInfo;
@@ -101,6 +104,7 @@ public class ManaGarden : Regist
 
     public static List<Slot> SlotList = new List<Slot>();
     public static List<Slot> PlantList = new List<Slot>();
+    public static List<Star> StarList = new List<Star>();
     public static List<ObjType> ElfList = new List<ObjType>();
     public static List<Transform> PageList = new List<Transform>();
 
@@ -117,6 +121,8 @@ public class ManaGarden : Regist
 
         ElfThread();
 
+        StarThread();
+
         AwardThread();
     }
 
@@ -136,6 +142,21 @@ public class ManaGarden : Regist
         }
     }
 
+    public void StarThread()
+    {
+        if (!ManaCenter.MiniLock && !ManaVisit.InVisit)
+        {
+            StarTimer += Time.fixedDeltaTime;
+
+            if (StarTimer >= StarTime)
+            {
+                StarTimer = 0;
+
+                StarList.Add(ManaReso.GetStar());
+            }
+        }
+    }
+
     public void AwardThread()
     {
         if (AwardLock)

+ 5 - 3
Assets/Script/Manage/ManaIAP.cs

@@ -26,7 +26,7 @@ public class ManaIAP : MonoBehaviour, IStoreListener
 
     #region Share配置
 
-    public static string ImageUrl
+    public static string ImagePath
     {
         get
         {
@@ -44,6 +44,7 @@ public class ManaIAP : MonoBehaviour, IStoreListener
     }
 
     public static string ShareUrl = "http://www.dashgame.com";
+    public static string ImageUrl = "http://or5zgoeui.bkt.clouddn.com/game_icon.png";
 
     public static ShareSDK ShareSdk;
 
@@ -216,7 +217,8 @@ public class ManaIAP : MonoBehaviour, IStoreListener
         shareContent.SetTitle(Language.GetStr("Common", "ShareTit"));
 
         shareContent.SetUrl(ShareUrl);
-        //shareContent.SetImagePath(ImageUrl);
+        shareContent.SetImageUrl(ImageUrl);
+        //shareContent.SetImagePath(ImagePath);
 
         shareContent.SetShareType(ContentType.App);
 
@@ -233,7 +235,7 @@ public class ManaIAP : MonoBehaviour, IStoreListener
         if (state == ResponseState.Success)
         {
             ManaCenter.ShareAmt++;
-
+            
             Bubble.Show(null, Language.GetStr("Common", "ShareSuccess"));
         }
         else if (state == ResponseState.Fail)

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

@@ -477,6 +477,10 @@ public class Award
         Flower.CoinFml = attribute[8].Value;
         DropGold.CoinFml = attribute[7].Value;
 
+        Star.CD = float.Parse(attribute[9].Value);
+        Star.Time = float.Parse(attribute[11].Value);
+        ManaGarden.StarTime = float.Parse(attribute[10].Value);
+
         CoinFml = attribute[1].Value;
         FlowerFml = attribute[4].Value;
         DiamondFml = attribute[3].Value;

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

@@ -55,6 +55,7 @@ public enum ObjType
 
     Music,
 
+    Star,
     DropGold,
     DropDiamond,
 
@@ -538,6 +539,34 @@ public class ManaReso : Regist
     }
 
 
+    public static Star GetStar()
+    {
+        Slot slot = ManaGarden.SlotList[Random.Range(0, 9) + Garden.CurPage*9];
+
+        Vector3 pos = slot.transform.position;
+
+        pos.z = -0.35f + Random.Range(-0.01f, 0.01f);
+
+        Transform tra = Get("Star", Folder.Scene, false, null, pos, ObjType.Star);
+
+        Star star = tra.GetComponent<Star>();
+
+        tra.parent = slot.transform;
+
+        if (star == null)
+        {
+            star = tra.AddComponent<Star>();
+
+            star.Initialize(pos.y);
+        }
+        else
+        {
+            star.Initialize(pos.y);
+        }
+
+        return star;
+    }
+
     public static Drop GetDrop(ObjType objType)
     {
         ManaAudio.PlayClip(Clip.DropClip);

+ 11 - 0
Assets/Script/Manage/ManaVisit.cs

@@ -280,6 +280,17 @@ public class ManaVisit
 
         ManaReso.SetActive("C_Garden", true);
 
+        if (!InVisit)
+        {
+            for (int i = 0; i < ManaGarden.StarList.Count; i++)
+            {
+                ManaReso.Save(ManaGarden.StarList[i]);
+            }
+
+            ManaGarden.StarList = new List<Star>();
+        }
+
+
         if (!ManaTutorial.TutorialC)
         {
             ManaReso.SetActive("C_Return", true);

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

@@ -15,7 +15,7 @@ public class DropGold : Drop
     public override void OnPointerClick(PointerEventData eventData)
     {
         base.OnPointerClick(eventData);
-
+        
         int coin = Mathf.CeilToInt((float) Auxiliary.FmlParse(CoinFml, "l", Mathf.Clamp(ManaCenter.Level, 1, Mathf.Infinity).ToString(), "r", Random.Range(0f, 1f).ToString()));
 
         Award.BonusCoin += coin;

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

@@ -457,7 +457,6 @@ public class Skill : SkillRoot
         NewUpgradeAmt = UpgradeAmt;
         NewCoinOnceBuff = CoinOnceBuff;
 
-
         if (ItemStatus_ == SkillStatus.Use)
         {
             UseA();

+ 148 - 0
Assets/Script/Object/Star.cs

@@ -0,0 +1,148 @@
+using UnityEngine;
+using UnityEngine.EventSystems;
+
+using System.Collections;
+using System.Collections.Generic;
+
+public class Star : MonoBehaviour, IPointerClickHandler
+{
+    #region 变量
+
+    public Rigidbody2D Rigidbody
+    {
+        get
+        {
+            if (Rigidbody_ == null)
+            {
+                Rigidbody_ = GetComponent<Rigidbody2D>();
+            }
+
+            return Rigidbody_;
+        }
+        set { Rigidbody_ = value; }
+    }
+    public BoxCollider2D BoxCollider
+    {
+        get
+        {
+            if (BoxCollider_ == null)
+            {
+                BoxCollider_ = GetComponent<BoxCollider2D>();
+            }
+
+            return BoxCollider_;
+        }
+        set { BoxCollider_ = value; }
+    }
+    public SpriteRenderer SpriteRenderer
+    {
+        get
+        {
+            if (SpriteRenderer_ == null)
+            {
+                SpriteRenderer_ = GetComponentInChildren<SpriteRenderer>();
+
+                SpriteRenderer_.CreateTweenScale(0, 0.75f, 0.25f, false, true, Curve.EaseOutQuad);
+
+
+                TweenRoot tween = SpriteRenderer_.CreateTweenSr(0, 1, 0.25f, true, false, Curve.EaseOutQuad);
+
+                tween.OnBackwardFinish = () =>
+                {
+                    ManaReso.Save(gameObject);
+
+                    ManaGarden.StarList.Remove(this);
+                };
+            }
+
+            return SpriteRenderer_;
+        }
+        set { SpriteRenderer_ = value; }
+    }
+
+    public Rigidbody2D Rigidbody_;
+    public BoxCollider2D BoxCollider_;
+    public SpriteRenderer SpriteRenderer_;
+
+    public float Timer;
+    public float SpeedY = 6f;
+    public float FreezeY;
+
+
+    public static float CD;
+    public static float Time;
+
+    #endregion
+
+    public void FixedUpdate()
+    {
+        Timer += UnityEngine.Time.fixedDeltaTime;
+        
+        if (Timer >= Time)
+        {
+            Timer = 0;
+
+            SpriteRenderer.TweenBacSr();
+        }
+
+        if (transform.position.y <= FreezeY - 0.1f)
+        {
+            Rigidbody.velocity = new Vector2();
+
+            Rigidbody.isKinematic = true;
+        }
+	}
+
+
+    public void Initialize(float freezY)
+    {
+        ManaAudio.PlayClip(Clip.BubbleClip);
+
+
+        float speedX = Mathf.Lerp(1.5f, 3f, Random.Range(0f, 1f));
+
+        if (Random.Range(0f,1f) < 0.5f)
+        {
+            speedX = -speedX;
+        }
+
+
+        Rigidbody.velocity = new Vector2(speedX, SpeedY);
+
+        Rigidbody.isKinematic = false;
+
+        BoxCollider.enabled = true;
+
+
+        Timer = 0;
+
+        FreezeY = freezY;
+
+        SpriteRenderer.GetTweenSr().InDestination = true;
+
+        SpriteRenderer.GetTweenScale().InOrigin = true;
+
+
+        SpriteRenderer.TweenForScale();
+    }
+
+
+    public void OnPointerClick(PointerEventData eventData)
+    {
+        ManaAudio.PlayClip(Clip.CurrentClip);
+
+
+        Rigidbody.velocity = new Vector2();
+
+        Rigidbody.isKinematic = true;
+
+        BoxCollider.enabled = false;
+
+
+        ManaInfo.Show(Language.GetStr("Object", "Star") + CD.ToString("0") + Language.GetStr("Plural", "Seconds"), 10f);
+
+        ManaCenter.MiniTimer -= CD;
+
+        SpriteRenderer.TweenBacSr();
+    }
+}

+ 12 - 0
Assets/Script/Object/Star.cs.meta

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

+ 17 - 0
Assets/Script/Tool/Auxiliary.cs

@@ -25,6 +25,11 @@ using UnityEngine.Advertisements;
 using Random = UnityEngine.Random;
 using Transform = UnityEngine.Transform;
 
+//public enum Unit
+//{
+//    Second
+//}
+
 public class Amount
 {
     public static double 百 = 100;
@@ -330,6 +335,18 @@ public class Auxiliary : Regist
     }
 
 
+    //public static string GetUnit(Unit unit, int value)
+    //{
+    //    if (value == 1)
+    //    {
+            
+    //    }
+    //    else
+    //    {
+            
+    //    }
+    //}
+
     public static string GetStreamPath()
     {
         if (Application.isEditor)

+ 7 - 3
ToList.txt

@@ -1,6 +1,10 @@
-开启图片分享
+单复数映射
 
+测试到大亨光临
 
-Unity Ads 代码和ServiceWindow 测试模式
 
-发布前把服务器中的存档清理一次
+更改分享的网页连接
+
+发布前把服务器中的存档清理一次
+
+Unity Ads 代码和ServiceWindow 测试模式