jet 8 lat temu
rodzic
commit
77faa6e6a8

+ 1 - 1
Assets/Resource/Sprite/SpriteUI/Skill/4大技能1.png.meta

@@ -19,7 +19,7 @@ TextureImporter:
     externalNormalMap: 0
     heightScale: 0.25
     normalMapFilter: 0
-  isReadable: 0
+  isReadable: 1
   grayScaleToAlpha: 0
   generateCubemap: 6
   cubemapConvolution: 0

+ 3 - 3
Assets/Resource/XML/Config/pack_config.xml

@@ -2,9 +2,9 @@
   <item id="1" name="金币大礼包" class="3" class_id="2" coin_person="" person="" skill_cd="" coin="9000*c" diamond="" flower="" use_lv="" use_cur="2" use_amnt="200" desc="立即获得金币 [&amp;coin&amp;]" icon="绿-金币包1" anim="" label="" />
   <item id="2" name="天赐大礼包" class="3" class_id="3" coin_person="" person="" skill_cd="" coin="36000*c" diamond="" flower="" use_lv="" use_cur="2" use_amnt="400" desc="立即获得金币 [&amp;coin&amp;]" icon="绿-金币包2" anim="" label="" />
   <item id="3" name="花神大礼包" class="3" class_id="4" coin_person="" person="" skill_cd="" coin="90000*c" diamond="" flower="" use_lv="" use_cur="2" use_amnt="800" desc="立即获得金币 [&amp;coin&amp;]" icon="绿-金币包3" anim="" label="" />
-  <item id="4" name="新手礼包" class="4" class_id="2" coin_person="50%" person="" skill_cd="" coin="" diamond="500" flower="25 300  " use_lv="" use_cur="3" use_amnt="6" desc="获得[&amp;flower&amp;],[&amp;diamond&amp;]钻石&#xA;所有金币产出提升[&amp;coin_person&amp;],永久有效" icon="蓝-初级包" anim="" label="" />
-  <item id="5" name="中级礼包" class="4" class_id="3" coin_person="50%" person="" skill_cd="" coin="" diamond="2000" flower="26 350" use_lv="" use_cur="3" use_amnt="30" desc="获得[&amp;flower&amp;],[&amp;diamond&amp;]钻石&#xA;所有金币产出提升[&amp;coin_person&amp;],永久有效" icon="蓝-中级包" anim="" label="" />
-  <item id="6" name="高级礼包" class="4" class_id="4" coin_person="50%" person="" skill_cd="" coin="" diamond="4000" flower="27 400" use_lv="" use_cur="3" use_amnt="68" desc="获得[&amp;flower&amp;],[&amp;diamond&amp;]钻石&#xA;所有金币产出提升[&amp;coin_person&amp;],永久有效" icon="蓝-高级包" anim="" label="" />
+  <item id="4" name="新手礼包" class="4" class_id="2" coin_person="50%" person="" skill_cd="" coin="1000000" diamond="500" flower="6" use_lv="" use_cur="3" use_amnt="6" desc="获得[&amp;flower&amp;],[&amp;diamond&amp;]钻石&#xA;所有金币产出提升[&amp;coin_person&amp;],永久有效" icon="蓝-初级包" anim="" label="" />
+  <item id="5" name="中级礼包" class="4" class_id="3" coin_person="50%" person="" skill_cd="" coin="" diamond="2000" flower="36" use_lv="" use_cur="3" use_amnt="30" desc="获得[&amp;flower&amp;],[&amp;diamond&amp;]钻石&#xA;所有金币产出提升[&amp;coin_person&amp;],永久有效" icon="蓝-中级包" anim="" label="" />
+  <item id="6" name="高级礼包" class="4" class_id="4" coin_person="50%" person="" skill_cd="" coin="" diamond="4000" flower="27" use_lv="" use_cur="3" use_amnt="68" desc="获得[&amp;flower&amp;],[&amp;diamond&amp;]钻石&#xA;所有金币产出提升[&amp;coin_person&amp;],永久有效" icon="蓝-高级包" anim="" label="" />
   <item id="7" name="钻石100" class="4" class_id="5" coin_person="" person="" skill_cd="" coin="" diamond="100" flower="" use_lv="" use_cur="3" use_amnt="6" desc="购买 [&amp;diamond&amp;]钻石" icon="蓝-免费钻" anim="" label="" />
   <item id="8" name="钻石500 赠送50" class="4" class_id="6" coin_person="" person="" skill_cd="" coin="" diamond="550" flower="" use_lv="" use_cur="3" use_amnt="30" desc="共计 [&amp;diamond&amp;]钻石" icon="蓝-免费钻" anim="" label="热卖" />
   <item id="9" name="钻石2000 赠送500" class="4" class_id="7" coin_person="" person="" skill_cd="" coin="" diamond="2500" flower="" use_lv="" use_cur="3" use_amnt="68" desc="共计 [&amp;diamond&amp;]钻石" icon="蓝-小量钻石" anim="" label="超值" />

BIN
Assets/Resource/Xlsx/pack_config.xlsx


+ 37 - 62
Assets/Script/Object/Skill/Pack.cs

@@ -46,7 +46,6 @@ public class Pack : SkillRoot
     public string Flower;
 
     public string[] Flowers;
-    public string[] Diamonds;
 
     public  Current BuyCur;
 
@@ -110,7 +109,6 @@ public class Pack : SkillRoot
         if (!string.IsNullOrEmpty(Flower))
         {
             Flowers = Flower.Split(' ')[0].Split(',');
-            Diamonds = Flower.Split(' ')[1].Split(',');
         }
 
         #endregion
@@ -158,14 +156,6 @@ public class Pack : SkillRoot
             return;
         }
 
-        if (Application.platform == RuntimePlatform.IPhonePlayer) //todo 暂时关闭
-        {
-            if (BuyCur == Current.Cash)
-            {
-                return;
-            }
-        }
-
         Level = int.Parse(attribute[3].Value);
         ItemStatus_ = (SkillStatus)Enum.Parse(typeof(SkillStatus), attribute[2].Value);
 
@@ -188,29 +178,8 @@ public class Pack : SkillRoot
         ItemStatus = ItemStatus;
     }
 
-    public override void RegistReference()
-    {
-        if (Application.platform == RuntimePlatform.IPhonePlayer) //todo 暂时关闭
-        {
-            if (BuyCur == Current.Cash) 
-            {
-                return;
-            }
-        }
-
-        base.RegistReference();
-    }
-
     public override void UpdateStatus()
     {
-        if (Application.platform == RuntimePlatform.IPhonePlayer) //todo 暂时关闭
-        {
-            if (BuyCur == Current.Cash)
-            {
-                return;
-            }
-        }
-
         if (!ManaCenter.Complete)
         {
             return;
@@ -250,23 +219,6 @@ public class Pack : SkillRoot
 
     protected void UseA()
     {
-        if (!string.IsNullOrEmpty(Flower))
-        {
-            for (int i = 0; i < Flowers.Length; i++)
-            {
-                FlowerInfo flowerInfo = ManaGarden.FlowerInfoDic[int.Parse(Flowers[i])];
-
-                if (!flowerInfo.Unlock)
-                {
-                    flowerInfo.Unlock = true;
-                }
-                else
-                {
-                    ManaCenter.AddDiamond(int.Parse(Diamonds[i]), StaticsManager.ItemID.获得钻石, StaticsManager.ConsumeModule.Charge);
-                }
-            }
-        }
-
         ManaCenter.SkillPlus += Plus;
         ManaCenter.SkillPerson += Person;
         ManaCenter.SkillPersonBuff += PersonBuff;
@@ -328,6 +280,7 @@ public class Pack : SkillRoot
 
     protected void PurchaseResult()
     {
+        int tempCoin = 0;
         int tempDiamond = (int) DiamondOnce;
 
         string tempFlower = "";
@@ -340,11 +293,24 @@ public class Pack : SkillRoot
 
                 if (flowerInfo.Unlock == false)
                 {
+                    flowerInfo.Unlock = true;
+
                     tempFlower += string.Format("{0}{1}{2}    ", Language.GetStr("UI", "J_Info0"), "<(花朵)>", flowerInfo.Name);
                 }
                 else
                 {
-                    tempDiamond += int.Parse(Diamonds[i]);
+                    if (flowerInfo.UnlockCur == Current.Coin)
+                    {
+                        tempCoin = flowerInfo.UnlockAmt/5;
+
+                        ManaCenter.AddCoin(flowerInfo.UnlockAmt / 5, StaticsManager.ItemID.获得金币, StaticsManager.ConsumeModule.Charge);
+                    }
+                    else if (flowerInfo.UnlockCur == Current.Diamond)
+                    {
+                        tempDiamond += flowerInfo.UnlockAmt/5;
+
+                        ManaCenter.AddDiamond(flowerInfo.UnlockAmt/5, StaticsManager.ItemID.获得钻石, StaticsManager.ConsumeModule.Charge);
+                    }
                 }
             }
         }
@@ -354,7 +320,16 @@ public class Pack : SkillRoot
 
         if (!string.IsNullOrEmpty(CoinFml))
         {
-            sb.AppendFormat("{0}{1}{2}    ", Language.GetStr("UI", "J_Info0"), "<(金币)>", Auxiliary.FmlParse(CoinFml, "l", ManaCenter.Level.ToString(), "c", ManaCenter.CoinPerson.ToString("0.000")).ToString("0"));
+            int coin = (int) Auxiliary.FmlParse(CoinFml, "l", ManaCenter.Level.ToString(), "c", ManaCenter.CoinPerson.ToString("0.000"));
+
+            ManaCenter.AddCoin(coin, StaticsManager.ItemID.获得金币, StaticsManager.ConsumeModule.Charge);
+
+            tempCoin += coin;
+        }
+
+        if (!tempCoin.Equal(0))
+        {
+            sb.AppendFormat("{0}{1}{2}    ", Language.GetStr("UI", "J_Info0"), "<(金币)>", tempCoin);
         }
 
         if (!tempDiamond.Equal(0))
@@ -461,18 +436,18 @@ public class Pack : SkillRoot
             {
                 #region MyRegion
 
-                if (!string.IsNullOrEmpty(Flower))
-                {
-                    for (int j = 0; j < Diamonds.Length; j++)
-                    {
-                        stringBuilder.Append(int.Parse(Diamonds[j]));
-
-                        if (j != Diamonds.Length - 1)
-                        {
-                            stringBuilder.Append(",");
-                        }
-                    }
-                }
+                //if (!string.IsNullOrEmpty(Flower))
+                //{
+                //    for (int j = 0; j < Diamonds.Length; j++)
+                //    {
+                //        stringBuilder.Append(int.Parse(Diamonds[j]));
+
+                //        if (j != Diamonds.Length - 1)
+                //        {
+                //            stringBuilder.Append(",");
+                //        }
+                //    }
+                //}
 
                 #endregion
             }

+ 6 - 25
Assets/Script/Tool/Auxiliary.cs

@@ -17,6 +17,7 @@ using System.Net.Mail;
 using System.Net;
 using System.Text;
 using System.Collections;
+using System.Diagnostics;
 using System.Collections.Generic;
 using System.Security.Cryptography;
 using System.Runtime.Serialization.Formatters.Binary;
@@ -26,6 +27,7 @@ using System.Text.RegularExpressions;
 using System.Security.Cryptography.Xml;
 
 using Json = MiniJSONV.Json;
+using Debug = UnityEngine.Debug;
 using Random = UnityEngine.Random;
 using Transform = UnityEngine.Transform;
 
@@ -130,35 +132,14 @@ public class Auxiliary : Regist
 
         if (Input.GetKeyDown(KeyCode.Escape))
         {
-            ManaServer.GetProductID
-                (
-                    "com.dashgame.garden.packfresh",
-                    data =>
-                    {
-                        int index = data.IndexOf('a');
-
-                        data = data.Substring(index);
-
-                        Debug.LogWarning(WWW.UnEscapeURL(data));
-                    }
-                );
-
-            ManaServer.GetProductID
-                (
-                    "com.dashgame.garden.packjunior",
-                    data =>
-                    {
-                        int index = data.IndexOf('a');
 
-                        data = data.Substring(index);
-
-                        Debug.LogWarning(WWW.UnEscapeURL(data));
-                    }
-                );
         }
         
         if (Input.GetKeyDown(KeyCode.N))
         {
+            ManaCenter.Coin = 0;
+            ManaCenter.Diamond = 0;
+
             //foreach (var VARIABLE in ManaGarden.FlowerInfoDic)
             //{
             //    VARIABLE.Value.Unlock = true;
@@ -638,7 +619,7 @@ public class Auxiliary : Regist
                 i = -1;
             }
         }
-        
+
         return double.Parse(FmlParse1(str));
     }
 

+ 2 - 0
ToList.txt

@@ -1,3 +1,5 @@
+购买礼包时花的转换价格从配置中取
+
 苹果的本地化
 
 播放广告可能有问题