LiuQilin 8 éve
szülő
commit
c48289dd73

BIN
.vs/MyLovelyGarden/v14/.suo


BIN
Assets/Resources/Garden.unity


BIN
Assets/Resources/Shader/HighLight.mat


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

@@ -1,4 +1,5 @@
 <PlayerConfig>
+  <Slot value="7" />
   <Sign value="0" />
   <Coin value="0" />
   <Level value="0" />

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

@@ -29,13 +29,6 @@ public class ManaData : Regist
         {
             _Level = value;
 
-            Slot = 7 + Level / 20;
-
-            for (int i = 0; i < Slot; i++)
-            {
-                ManaGarden.SlotList[i].Valid = true;
-            }
-
             ManaDebug.Log(string.Format("已升级 花园等级 : <color=red>{0}</color>", _Level));
 
             for (int i = 0; i < SkillList.Count; i++)
@@ -376,7 +369,7 @@ public class ManaData : Regist
         if (elapse > CircleTimer)
         {
             int ffCircle = 1 + Mathf.FloorToInt((elapse - CircleTimer)/CircleTime);
-
+            
             ManaDebug.Log(string.Format("离线周期<color=red>{0}</color>", ffCircle));
 
             for (int i = 0; i < ffCircle; i++)
@@ -459,6 +452,13 @@ public class ManaData : Regist
         Coin = double.Parse(Data.PlayerNode.SelectSingleNode("Coin").Attributes[0].Value);
         Diamond = double.Parse(Data.PlayerNode.SelectSingleNode("Diamond").Attributes[0].Value);
 
+        int slot = int.Parse(Data.PlayerNode.SelectSingleNode("Slot").Attributes[0].Value);
+
+        for (int i = 0; i < slot; i++)
+        {
+            ManaGarden.UnlockSlot();
+        }
+
         #endregion
 
         #region 计算离线收入

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

@@ -145,6 +145,24 @@ public class ManaGarden : Regist
     }
 
 
+    public static void UnlockSlot()
+    {
+        for (int i = 0; i < SlotList.Count; i++)
+        {
+            if (SlotList[i].Valid == false)
+            {
+                ManaData.Slot++;
+
+                SlotList[i].Valid = true;
+
+                return;
+            }
+        }
+
+        ManaDebug.Log("所有土地已解锁");
+    }
+
+
     public static void SetFlowerCard(FlowerInfo flowerInfo)
     {
         SeleFlowerInfo = flowerInfo;

+ 2 - 1
Assets/Script/Manage/ManaMiniGame.cs

@@ -61,6 +61,7 @@ public class Award
         ManaReso.SetActive("Da_Diamond", false);
 
         int coin = (int) Auxiliary.FmlParse(CoinFml, "s", score.ToString());
+        coin = (int) (coin * ManaData.SkillPlus);
 
         ManaData.Coin += coin;
         ManaReso.SetText("Da_CoinLab", coin.ToString());
@@ -280,7 +281,7 @@ public class ManaMiniGame : Regist
 
             if (OpTimer <= 0)
             {
-                OpTime -= OpTime * 0.02f;
+                OpTime -= OpTime * 0.03f;
 
                 OpTimer = OpTime;
 

+ 17 - 11
Assets/Script/Object/Skill/Ability.cs

@@ -30,7 +30,8 @@ public class Ability : SkillRoot
     protected Current UpgradeCur;
     protected Current UnlockAheadCur;
 
-    protected bool Article;
+    protected bool ValidSlot;
+    protected bool ValidAnim;
     protected string Desc;
     protected string Label;
     protected string Anim;
@@ -330,9 +331,9 @@ public class Ability : SkillRoot
 
     protected void UseConti()
     {
-        if (Article == false)
+        if (ValidAnim == false)
         {
-            Article = true;
+            ValidAnim = true;
 
             if (!string.IsNullOrEmpty(Anim))
             {
@@ -342,17 +343,22 @@ public class Ability : SkillRoot
             }
         }
 
-        if (Name == "花园")
+        if (ValidSlot == false)
         {
-            ManaData.Person += NewPerson;
-            ManaData.CoinPerson += NewCoinPerson;
-        }
-        else
-        {
-            ManaData.SkillPerson += NewPerson;
-            ManaData.SkillCoinPerson += NewCoinPerson;
+            ValidSlot = true;
+
+            if (!string.IsNullOrEmpty(UnlockPos))
+            {
+                for (int i = 0; i < int.Parse(UnlockPos); i++)
+                {
+                    ManaGarden.UnlockSlot();
+                }
+            }
         }
 
+        ManaData.Person += NewPerson;
+        ManaData.CoinPerson += NewCoinPerson;
+
         ManaData.SkillPlus += NewPlus;
         ManaData.SkillPersonBuff += NewPersonBuff;
 

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

@@ -70,7 +70,7 @@ public class Auxiliary : MonoBehaviour
 
         if (Input.GetKeyDown(KeyCode.I))
         {
-            ManaData.Coin += 1000;
+            ManaData.Coin += 100000000000000;
             ManaData.Diamond += 1000;
         }
 

+ 5 - 7
Assets/Script/Tool/Data.cs

@@ -219,14 +219,11 @@ public class Data
         {
             if (ManaGarden.FlowerInfoList[i].Unlock)
             {
-                xmlAttribute.Value += ManaGarden.FlowerInfoList[i].Id - 1;
-
-                if (i != ManaGarden.FlowerInfoList.Count - 1)
-                {
-                    xmlAttribute.Value += " ";
-                }
+                xmlAttribute.Value += ManaGarden.FlowerInfoList[i].Id - 1 + " ";
             }
         }
+
+        xmlAttribute.Value = xmlAttribute.Value.Trim(' ');
     }
 
     public  static void SavePlayerConfig()
@@ -388,6 +385,7 @@ public class Data
 
     private static void ResetCommon()
     {
+        PlayerNode.SelectSingleNode("Slot").Attributes[0].Value = "7";
         PlayerNode.SelectSingleNode("Sign").Attributes[0].Value = "0";
         PlayerNode.SelectSingleNode("Coin").Attributes[0].Value = "0";
         PlayerNode.SelectSingleNode("Level").Attributes[0].Value = "0";
@@ -395,7 +393,7 @@ public class Data
         PlayerNode.SelectSingleNode("Diamond").Attributes[0].Value = "0";
         PlayerNode.SelectSingleNode("QuitTime").Attributes[0].Value = DateTime.Now.ToString();
         PlayerNode.SelectSingleNode("CoinPerson").Attributes[0].Value = "0";
-        PlayerNode.SelectSingleNode("CircleTimer").Attributes[0].Value = "0";
+        PlayerNode.SelectSingleNode("CircleTimer").Attributes[0].Value = "10";
     }
 
     private static void ResetFlowerList()

+ 1 - 5
MyLovelyGarden.txt

@@ -1,10 +1,6 @@
 网络逻辑优化
 
-解锁土地由蝴蝶控制
-
-Person和CoinPerson显示基数还是当前值 以秒为单位还是分钟
-
-小游戏奖励加成
+小游戏奖励加成如何显示
 
 Tab的Shader