Browse Source

Fix few bugs

LiuQilin 8 years ago
parent
commit
208e4fb042

BIN
.vs/MyLovelyGarden/v14/.suo


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


+ 1 - 1
Assets/Resource/XML/Config/skill_config.xml

@@ -1,5 +1,5 @@
 <data>
-  <item id="1" name="人潮涌动" class="1" class_id="2" skill_index="1" reduce_cd="1" coin_person="" person="1" coin_once="" diamond_once="" skill_cd="" duration="300" cd="1800" unlock_lv="" unlock_ahead_cur="" unlock_ahead_amt="" unlock_cur="1" unlock_amnt="5" unlock_pos="" use__cur="" use_amnt="" upgrade_cur="2" upgrade_amnt="200" upgrade_fml="a" upgrade_plus="" upgrade_person="" upgrade_coin_once="" upgrade_duration="60" upgrade_cd="" desc="每分钟增加[&amp;person&amp;*60],持续[&amp;duration&amp;/60][lv]分钟" icon="4大技能1" anim="" label="" />
+  <item id="1" name="人潮涌动" class="1" class_id="2" skill_index="1" reduce_cd="1" coin_person="" person="1" coin_once="" diamond_once="" skill_cd="" duration="10" cd="1800" unlock_lv="" unlock_ahead_cur="" unlock_ahead_amt="" unlock_cur="1" unlock_amnt="5" unlock_pos="" use__cur="" use_amnt="" upgrade_cur="2" upgrade_amnt="200" upgrade_fml="a" upgrade_plus="" upgrade_person="" upgrade_coin_once="" upgrade_duration="60" upgrade_cd="" desc="每分钟增加[&amp;person&amp;*60],持续[&amp;duration&amp;/60][lv]分钟" icon="4大技能1" anim="" label="" />
   <item id="2" name="大亨光临" class="1" class_id="3" skill_index="2" reduce_cd="1" coin_person="" person="" coin_once="50000%" diamond_once="" skill_cd="" duration="" cd="3600" unlock_lv="100" unlock_ahead_cur="2" unlock_ahead_amt="200" unlock_cur="1" unlock_amnt="100" unlock_pos="" use__cur="" use_amnt="" upgrade_cur="2" upgrade_amnt="300" upgrade_fml="a" upgrade_plus="" upgrade_person="" upgrade_coin_once="5000%" upgrade_duration="" upgrade_cd="" desc="立即获得每人次收入的[&amp;coin_once&amp;][lv]倍" icon="4大技能2" anim="" label="" />
   <item id="3" name="花之祝福" class="1" class_id="4" skill_index="3" reduce_cd="1" coin_person="500%" person="" coin_once="" diamond_once="" skill_cd="" duration="300" cd="3600" unlock_lv="300" unlock_ahead_cur="2" unlock_ahead_amt="300" unlock_cur="" unlock_amnt="" unlock_pos="" use__cur="" use_amnt="" upgrade_cur="2" upgrade_amnt="300" upgrade_fml="a" upgrade_plus="" upgrade_person="" upgrade_coin_once="" upgrade_duration="60" upgrade_cd="" desc="所有收入提升[&amp;coin_person&amp;],持续[&amp;duration&amp;/60][lv]" icon="4大技能3" anim="" label="" />
   <item id="4" name="繁花似锦" class="4" class_id="1" skill_index="" reduce_cd="" coin_person="200%" person="" coin_once="" diamond_once="" skill_cd="" duration="900" cd="900" unlock_lv="100" unlock_ahead_cur="2" unlock_ahead_amt="100" unlock_cur="" unlock_amnt="" unlock_pos="" use__cur="2" use_amnt="150" upgrade_cur="" upgrade_amnt="" upgrade_fml="" upgrade_plus="" upgrade_person="" upgrade_coin_once="" upgrade_duration="" upgrade_cd="" desc="所有金币产出提升[&amp;coin_person&amp;],持续[&amp;duration&amp;]分钟" icon="绿-繁花似锦" anim="" label="" />

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

@@ -1,5 +1,5 @@
 <PlayerConfig>
-  <Version value="258" />
+  <Version value="280" />
 
   <ID value="Default" />
 ////  <TutorialA value="0" />
@@ -17,7 +17,7 @@
   
   <Slot value="1" />
   <Coin value="0" />
-////  <Level value="20" />
+////  <Level value="0" />
   <Diamond value="0" />
   <SignIndex value="1" />
   <SignRound value="1" />
@@ -34,7 +34,7 @@
     <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" />
     <Skill ID="Skill6" SkillType="Skill" ItemStatus="Lock" Level="0" CdTimer="0" EffectTimer="0" />
-    <Skill ID="Skill1" SkillType="BigSkill" ItemStatus="Lock" BarStatus="UnLock" Level="1" CdTimer="0" EffectTimer="0" />
+    <Skill ID="Skill1" SkillType="BigSkill" ItemStatus="Lock" BarStatus="UnLock" Level="0" CdTimer="0" EffectTimer="0" />
     <Skill ID="Skill2" SkillType="BigSkill" ItemStatus="Lock" BarStatus="UnLock" Level="0" CdTimer="0" EffectTimer="0" />
     <Skill ID="Skill3" SkillType="BigSkill" ItemStatus="Lock" BarStatus="UnLock" Level="0" CdTimer="0" EffectTimer="0" />
     <Skill ID="Skill7" SkillType="BigSkill" ItemStatus="Lock" BarStatus="UnLock" Level="0" CdTimer="0" EffectTimer="0" />

+ 17 - 7
Assets/Script/Manage/ManaData.cs

@@ -125,7 +125,7 @@ public class ManaData : Regist
         set
         {
             Level_ = value;
-
+            
             ManaDebug.Log(string.Format("已升级 花园等级 : <color=red>{0}</color>", Level_));
 
             ManaAchieve.UpdateStatus(AchieveType.GardenLevel, Level_);
@@ -206,7 +206,7 @@ public class ManaData : Regist
         {
             Person_ = value;
 
-            ManaReso.SetText("F_PersonLab", Mathf.FloorToInt(60*(Person_ + SkillPerson_)).ToString());
+            ManaReso.SetText("F_PersonLab", Mathf.FloorToInt(60*(Person_ * (1 + SkillPersonBuff_) + SkillPerson_)).ToString());
         }
     }
     public static float SkillPerson
@@ -240,7 +240,7 @@ public class ManaData : Regist
                 }
             }
 
-            ManaReso.SetText("F_PersonLab", Mathf.FloorToInt(60*(Person_ + SkillPerson_)).ToString());
+            ManaReso.SetText("F_PersonLab", Mathf.FloorToInt(60*(Person_ * (1 + SkillPersonBuff_) + SkillPerson_)).ToString());
         }
     }
     public static float CoinPerson
@@ -253,6 +253,16 @@ public class ManaData : Regist
             ManaReso.SetText("F_CoinPersonLab", Mathf.FloorToInt(CoinPerson_ + SkillCoinPerson_).ToString());
         }
     }
+    public static float SkillPersonBuff
+    {
+        get { return SkillPersonBuff_; }
+        set
+        {
+            SkillPersonBuff_ = value;
+
+            ManaReso.SetText("F_PersonLab", Mathf.FloorToInt(60 * (Person_ * (1 + SkillPersonBuff_) + SkillPerson_)).ToString());
+        }
+    }
     public static float SkillCoinPerson
     {
         get { return SkillCoinPerson_; }
@@ -345,7 +355,7 @@ public class ManaData : Regist
 
     public static float SkillPlus;
     public static float SkillPerson_;
-    public static float SkillPersonBuff;
+    public static float SkillPersonBuff_;
     public static float SkillCoinPerson_;
 
     public static DateTime QuitTime;
@@ -474,7 +484,7 @@ public class ManaData : Regist
 
             ManaReso.Get("C_IncomeLab").TweenForGra();
             ManaReso.Get("C_IncomeLab").TweenForVec();
-            ManaReso.SetText("C_IncomeLab", "+" + temp.ToString("0"));
+            ManaReso.SetText("C_IncomeLab", "+" + temp.ToString("0.0"));
 
             ManaDebug.Log(string.Format("参观收益<color=red>{0:0.0}</color> = <color=red>{1}</color> * <color=red>{2}</color> * <color=red>{3}</color> * <color=red>{4}</color> (人次*金币*时间*加成)", temp, NewPerson, NewCoinPerson, CircleTime, 1 + SkillPlus));
         }
@@ -517,7 +527,7 @@ public class ManaData : Regist
 
         SkillPlus = 0;
         SkillPerson = 0;
-        SkillPersonBuff = 0;
+        SkillPersonBuff_ = 0;
         SkillCoinPerson = 0;
 
         SaveTimer = 0;
@@ -760,7 +770,7 @@ public class ManaData : Regist
                     FFCoolList.Add(FFUseList[i][j]);
                 }
 
-                NewPerson = Person * (1 + SkillPersonBuff) + SkillPerson;
+                NewPerson = Person * (1 + SkillPersonBuff_) + SkillPerson;
                 NewCoinPerson = CoinPerson + SkillCoinPerson;
 
                 TotalPerson += NewPerson * CircleTime;

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

@@ -127,7 +127,7 @@ public class ManaGarden : Regist
 
         if (ElfTimer < 0)
         {
-            ElfTimer = Random.Range(0f, 30f);
+            ElfTimer = Random.Range(0f, 3f);
 
             if (ElfList.Count > 0 && PlantList.Count > 0)
             {
@@ -240,7 +240,7 @@ public class ManaGarden : Regist
     {
         Instance = this;
 
-        ElfTimer = Random.Range(0f, 30f);
+        ElfTimer = Random.Range(0f, 3f);
         AwardTimer = Random.Range(5, 15);
 
         #region 读花朵存档

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

@@ -689,7 +689,7 @@ public class ManaUI : Regist
                 ManaReso.Get("GardenMini").TweenBacVec();
                 ManaReso.Get("D_MiniGame").TweenBacCG();
 
-                ManaInfo.Show(Award.Info, 6f);
+                ManaInfo.Show(Award.Info, 10f);
             }
         );
 

+ 18 - 5
Assets/Script/Manage/ManaVisit.cs

@@ -449,10 +449,8 @@ public class ManaVisit
 
         List<KV<int, int>> plantList = Data.GetPlantList(Node);
         
-        Debug.Log("Count" + ManaGarden.PlantList.Count);
         for (int i = 0; i < plantList.Count; i++)
         {
-            Debug.Log("Plant : " + plantList[i].Key + " " + plantList[i].Value);
             ManaGarden.PlantFlower(plantList[i].Key, plantList[i].Value);
         }
 
@@ -511,18 +509,33 @@ public class ManaVisit
 
     public static void GetArchive()
     {
-        ManaServer.Random
+        ManaServer.Load
         (
+            "hsoiv1",
             (jsonData) =>
             {
                 LoadFinish = true;
-                
+
                 XmlStr = jsonData["l"].ToString();
-                
+
                 Enter();
             }
         );
 
+
+        //ManaServer.Random
+        //(
+        //    (jsonData) =>
+        //    {
+        //        LoadFinish = true;
+
+        //        XmlStr = jsonData["l"].ToString();
+
+        //        Enter();
+        //    }
+        //);
+
+
         //if (Random.Range(0f, 1f) <= CreatePosi)
         //{
         //    XmlDocument document = new XmlDocument();

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

@@ -15,7 +15,7 @@ public class Elf : Regist
 
     public void Save()
     {
-        Flower.ElfList.Remove(transform);
+        Flower.ElfList.Remove(Root);
 
         ManaReso.Save(Root);
     }

+ 5 - 0
Assets/Script/Object/Flower.cs

@@ -530,6 +530,11 @@ public class Flower : Regist, IPointerClickHandler
 
     public void OnPointerClick(PointerEventData eventData)
     {
+        if (ManaVisit.Visit)
+        {
+            return;
+        }
+
         if (eventData.rawPointerPress.transform == transform)
         {
             ManaReso.Get("G_Flower").TweenForCG();

+ 26 - 8
Assets/Script/Object/Skill/Ability.cs

@@ -176,11 +176,11 @@ public class Ability : SkillRoot
                 {
                     NewUpgradeAmt = Auxiliary.FmlParse(UpgradeFml, "a", NewUpgradeAmt.ToString());
                 }
-
+                
                 UpgradeValue(ref NewPlus, Plus, UpgradePlus, Level - 1);
-                UpgradeValue(ref NewSkillCdBuff, UpgradeCD, Level - 1);
+                UpgradeSkillCdBuff(ref NewSkillCdBuff, UpgradeCD, Level - 1);
                 UpgradeValue(ref NewPersonBuff, PersonBuff, UpgradePerson, Level - 1);
-
+                
                 UpgradeValue(ref NewPerson, Person, UpgradePerson, Level - 1);
                 UpgradeValue(ref NewSkillCD, SkillCD, UpgradeCD, Level - 1);
                 UpgradeValue(ref NewCoinPerson, CoinPerson, UpgradePlus, Level - 1);
@@ -467,7 +467,7 @@ public class Ability : SkillRoot
             UpgradeValue(ref NewCoinPerson, CoinPerson, UpgradePlus, 1);
 
             UpgradeValue(ref NewPlus, Plus, UpgradePlus, 1);
-            UpgradeValue(ref NewSkillCdBuff, UpgradeCD, 1);
+            UpgradeSkillCdBuff(ref NewSkillCdBuff, UpgradeCD, 1);
             UpgradeValue(ref NewPersonBuff, PersonBuff, UpgradePerson, 1);
 
             UseA();
@@ -588,7 +588,16 @@ public class Ability : SkillRoot
 
                     UpgradeUnit(ref temp, strings[i]);
 
-                    stringBuilder.Append(temp.ToString("0"));
+                    float remainder = temp % 1;
+
+                    if (remainder > 0)
+                    {
+                        stringBuilder.Append(temp.ToString("0") + "+");
+                    }
+                    else
+                    {
+                        stringBuilder.Append(temp.ToString("0"));
+                    }
                 }
                 else if (Math.Abs(PersonBuff) > 0.0005f)
                 {
@@ -619,8 +628,8 @@ public class Ability : SkillRoot
                 {
                     temp = NewSkillCdBuff;
 
-                    UpgradeValue(ref temp, UpgradeCD, offset);
-
+                    UpgradeSkillCdBuff(ref temp, UpgradeCD, offset);
+                    
                     stringBuilder.Append(string.Format("{0:0}%", temp * 100));
                 }
 
@@ -638,7 +647,16 @@ public class Ability : SkillRoot
 
                     UpgradeUnit(ref temp, strings[i]);
 
-                    stringBuilder.Append(temp.ToString("0"));
+                    float remainder = temp % 1;
+
+                    if (remainder > 0)
+                    {
+                        stringBuilder.Append(temp.ToString("0") + "+");
+                    }
+                    else
+                    {
+                        stringBuilder.Append(temp.ToString("0"));
+                    }
                 }
                 else if (Math.Abs(Plus) > 0.0005f)
                 {

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

@@ -100,7 +100,7 @@ public class BigSkill : Skill
 
     public override void Annul()
     {
-        CoolTimer = CD * (1 + CdBuff);
+        CoolTimer = CD * CdBuff;
 
         //BarLab.color = Color.white;
 
@@ -227,7 +227,7 @@ public class BigSkill : Skill
                 }
 
                 UpgradeValue(ref NewPlus, Plus, UpgradePlus, Level - 1);
-                UpgradeValue(ref NewSkillCdBuff, UpgradeCD, Level - 1);
+                UpgradeSkillCdBuff(ref NewSkillCdBuff, UpgradeCD, Level - 1);
                 UpgradeValue(ref NewPersonBuff, PersonBuff, UpgradePerson, Level - 1);
                 UpgradeValue(ref NewCoinOnceBuff, UpgradeCoinOnce, Level - 1);
 
@@ -309,7 +309,7 @@ public class BigSkill : Skill
         {
             if (buff)
             {
-                CdBuff -= amt;
+                CdBuff = 1 - amt;
             }
             else
             {
@@ -395,7 +395,7 @@ public class BigSkill : Skill
             NewUpgradeAmt = Auxiliary.FmlParse(UpgradeFml, "a", NewUpgradeAmt.ToString());
 
             UpgradeValue(ref NewPlus, Plus, UpgradePlus, 1);
-            UpgradeValue(ref NewSkillCdBuff, UpgradeCD, 1);
+            UpgradeSkillCdBuff(ref NewSkillCdBuff, UpgradeCD, 1);
             UpgradeValue(ref NewPersonBuff, PersonBuff, UpgradePerson, 1);
             UpgradeValue(ref NewCoinOnceBuff, UpgradeCoinOnce, 1);
 
@@ -439,7 +439,7 @@ public class BigSkill : Skill
             UseA();
             UseB();
 
-            ManaInfo.Show(String.Format("{0}{1}", Language.GetStr("UI", "J_Info1"), Language.GetStr("SkillName", ID)), 6f);
+            ManaInfo.Show(String.Format("{0}{1}", Language.GetStr("UI", "J_Info1"), Language.GetStr("SkillName", ID)), 10f);
         });
     }
 

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

@@ -311,7 +311,7 @@ public class Pack : SkillRoot
 
         if (!string.IsNullOrEmpty(str))
         {
-            ManaInfo.Show(str, 6f);
+            ManaInfo.Show(str, 10f);
         }
 
         Level++;

+ 25 - 7
Assets/Script/Object/Skill/Skill.cs

@@ -35,7 +35,7 @@ public class Skill : SkillRoot
     protected double UpgradeAmt;
 
     protected float Plus;
-    protected float CdBuff;
+    protected float CdBuff = 1;
     protected float PersonBuff;
     protected float SkillCdBuff;
     protected float CoinOnceBuff;
@@ -203,7 +203,7 @@ public class Skill : SkillRoot
 
     public override void Annul()
     {
-        CoolTimer = CD * (1 + CdBuff);
+        CoolTimer = CD * CdBuff;
         
         ManaData.CoolList.Add(this);
 
@@ -298,7 +298,7 @@ public class Skill : SkillRoot
 
         if (!string.IsNullOrEmpty(str))
         {
-            ManaInfo.Show(sb.ToString(), 6f);
+            ManaInfo.Show(sb.ToString(), 10f);
         }
     }
 
@@ -328,7 +328,7 @@ public class Skill : SkillRoot
             UseA();
             UseB();
 
-            ManaInfo.Show(String.Format("{0}{1}", Language.GetStr("UI", "J_Info1"), Language.GetStr("SkillName", ID)), 6f);
+            ManaInfo.Show(String.Format("{0}{1}", Language.GetStr("UI", "J_Info1"), Language.GetStr("SkillName", ID)), 10f);
         });
     }
 
@@ -516,7 +516,7 @@ public class Skill : SkillRoot
         {
             if (buff)
             {
-                CdBuff -= amt;
+                CdBuff = 1 - amt;
             }
             else
             {
@@ -563,7 +563,16 @@ public class Skill : SkillRoot
                     UpgradeValue(ref temp, Person, UpgradePerson, offset);
                     UpgradeUnit(ref temp, strings[i]);
 
-                    stringBuilder.Append(temp.ToString("0"));
+                    float remainder = temp % 1;
+
+                    if (remainder > 0)
+                    {
+                        stringBuilder.Append(temp.ToString("0") + "+");
+                    }
+                    else
+                    {
+                        stringBuilder.Append(temp.ToString("0"));
+                    }
                 }
                 else if (Math.Abs(PersonBuff) > 0.0005f)
                 {
@@ -631,7 +640,16 @@ public class Skill : SkillRoot
 
                     UpgradeValue(ref temp, CoinPerson, UpgradePlus, offset);
 
-                    stringBuilder.Append(temp.ToString("0"));
+                    float remainder = temp % 1;
+
+                    if (remainder > 0)
+                    {
+                        stringBuilder.Append(temp.ToString("0") + "+");
+                    }
+                    else
+                    {
+                        stringBuilder.Append(temp.ToString("0"));
+                    }
                 }
                 else if (Math.Abs(Plus) > 0.0005f)
                 {

+ 13 - 0
Assets/Script/Object/Skill/SkillRoot.cs

@@ -347,6 +347,19 @@ public abstract class SkillRoot
         }
     }
 
+    protected void UpgradeSkillCdBuff(ref float target, string fml, int offset)
+    {
+        if (fml.Contains("%"))
+        {
+            float unit = (float.Parse(fml.Replace("%", "")))/100;
+
+            for (int i = 0; i < offset; i++)
+            {
+                target += (1 - target) * unit;
+            }
+        }
+    }
+
 
     protected void ValueBuffParse(out float value, out float buff, string str)
     {

+ 9 - 9
Assets/Script/Tool/UI/TextPlus.cs

@@ -186,7 +186,7 @@ public class TextPlus : Text
 
     protected void Initialize()
     {
-        LineHeight = cachedTextGenerator.lines[0].height*0.65f;
+        LineHeight = cachedTextGenerator.lines[0].height;
 
         ImageIndex = new List<int>();
         RemovePos = new List<int>();
@@ -442,8 +442,14 @@ public class TextPlus : Text
 
     protected void CreateImage(ImageInfo imageInfo)
     {
-        float width;
-        float height;
+        float height = LineHeight*0.65f;
+
+        if (Application.isMobilePlatform)
+        {
+            height *= 0.5f;
+        }
+
+        float width = (height / imageInfo.SpriteInfo.Height) * imageInfo.SpriteInfo.Width;
 
         bool first = false;
 
@@ -473,9 +479,6 @@ public class TextPlus : Text
 
         if (first)
         {
-            height = (TextVertex[0 + imageInfo.Left*6].position.y - TextVertex[4 + imageInfo.Left*6].position.y)*2;
-            width = (height/imageInfo.SpriteInfo.Height)*imageInfo.SpriteInfo.Width;
-
             Vector3 middleLeft = (TextVertex[0 + imageInfo.Left*6].position + TextVertex[4 + imageInfo.Left*6].position)/2;
 
             v0.position = middleLeft + new Vector3(0, height/2);
@@ -490,9 +493,6 @@ public class TextPlus : Text
         }
         else
         {
-            height = TextVertex[1 + (imageInfo.Left - 1)*6].position.y - TextVertex[2 + (imageInfo.Left - 1)*6].position.y;
-            width = (height/imageInfo.SpriteInfo.Height)*imageInfo.SpriteInfo.Width;
-
             Vector3 middleRight = (TextVertex[1 + (imageInfo.Left - 1) * 6].position + TextVertex[2 + (imageInfo.Left - 1) * 6].position) / 2;
 
             v0.position = middleRight + new Vector3(0, height / 2);

BIN
ProjectSettings/GraphicsSettings.asset


+ 15 - 8
ToList.txt

@@ -1,27 +1,34 @@
-检查各个技能的效果
+编存档 下载随机存档失败时就编一个存档
 
 
-编存档 下载随机存档失败时就编一个存档
+拉进时上边都蓝线
 
-分享图片报错
+镜头拉近冲突的情况
+
+注册Bug
 
 Reactive的Bug
 
-如果存档被删除了就重新下载一次
+检查各个技能的效果
 
-发布前把服务器中的存档清理一次
 
-带宽优化 打包图集
 
-返回时有存蝴蝶、花的Bug
+分享图片报错
+
+带宽优化 打包图集
 
-注册Bug(ManaDebug并没有输出信息)
+不同平台图文混排图片的大小
 
 从Hierrarchy视图中检查是否有Bug
 
+如果存档被删除了就重新下载一次
+
+发布前把服务器中的存档清理一次
+
 红色小蝴蝶和教程B冲突了 自动解锁蜜蜂和蝴蝶会冲突
 
 
+
 Hud能往左右上下走,设置自己的颜色 设置Outline的颜色 设置速度
 
 动画