Просмотр исходного кода

修改了星星跳动的方向、离线收益Text居中问题、金币过大的Bug

LiuQilin 8 лет назад
Родитель
Сommit
309395b058

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


+ 5 - 0
Assets/Script/Manage/ManaCenter.cs

@@ -1072,6 +1072,11 @@ public class ManaCenter : Regist
         {
             Background = true;
 
+            if (DownloadLock)
+            {
+                return;
+            }
+
             ManaVisit.DataReverse();
 
             ManaData.SavePlayerConfig();

+ 11 - 3
Assets/Script/Manage/ManaReso.cs

@@ -562,7 +562,15 @@ public class ManaReso : Regist
 
     public static Star GetStar()
     {
-        Slot slot = ManaGarden.SlotList[Random.Range(0, 9) + Garden.CurPage*9];
+        int slotIndex = Random.Range(0, 9);
+
+        bool forceLeft = slotIndex == 3 || slotIndex == 8;
+        bool forceRight = slotIndex == 0 || slotIndex == 4;
+
+        slotIndex += Garden.CurPage*9;
+
+
+        Slot slot = ManaGarden.SlotList[slotIndex];
 
         Vector3 pos = slot.transform.position;
 
@@ -578,11 +586,11 @@ public class ManaReso : Regist
         {
             star = tra.AddComponent<Star>();
 
-            star.Initialize(pos.y);
+            star.Initialize(pos.y, forceLeft, forceRight);
         }
         else
         {
-            star.Initialize(pos.y);
+            star.Initialize(pos.y, forceLeft, forceRight);
         }
 
         return star;

+ 13 - 2
Assets/Script/Object/Star.cs

@@ -94,17 +94,28 @@ public class Star : MonoBehaviour, IPointerClickHandler
 	}
 
 
-    public void Initialize(float freezY)
+    public void Initialize(float freezY, bool forceLeft, bool forceRight)
     {
         ManaAudio.PlayClip(Clip.BubbleClip);
 
 
         float speedX = Mathf.Lerp(1.5f, 3f, Random.Range(0f, 1f));
 
-        if (Random.Range(0f,1f) < 0.5f)
+        if (forceLeft)
         {
             speedX = -speedX;
         }
+        else if (forceRight)
+        {
+            speedX = speedX;
+        }
+        else
+        {
+            if (Random.Range(0f, 1f) < 0.5f)
+            {
+                speedX = -speedX;
+            }
+        }
 
 
         Rigidbody.velocity = new Vector2(speedX, SpeedY);

+ 39 - 5
Assets/Script/Tool/Auxiliary.cs

@@ -125,7 +125,7 @@ public class Auxiliary : Regist
 
         if (Input.GetKeyDown(KeyCode.Z))
         {
-            //ManaCenter.Coin += 10000000;
+            ManaCenter.Coin += Amount.万万亿;
         }
 
         if (Input.GetKeyDown(KeyCode.X))
@@ -615,6 +615,12 @@ public class Auxiliary : Regist
 
                 return (longValue / temp) * temp;
             }
+            else
+            {
+                long temp = (long)Amount.千亿;
+
+                return (longValue / temp) * temp;
+            }
         }
         else if (ManaLan.CurrentLan == Lan.ChineseSimplified || ManaLan.CurrentLan == Lan.ChineseTraditional)
         {
@@ -640,9 +646,17 @@ public class Auxiliary : Regist
 
                 return (longValue / temp) * temp;
             }
-        }
+            else
+            {
+                long temp = (long)Amount.千亿;
 
-        throw new Exception();
+                return (longValue / temp) * temp;
+            }
+        }
+        else
+        {
+            throw new Exception();
+        }
     }
 
     public static string ShrinkNumberStr(double value, int accuracy = 1)
@@ -679,6 +693,12 @@ public class Auxiliary : Regist
 
                 return OmitNumberStr(accuracy, str) + "T";
             }
+            else
+            {
+                string str = (longValue / Amount.万亿).ToString();
+
+                return OmitNumberStr(accuracy, str) + "T";
+            }
         }
         else if (ManaLan.CurrentLan == Lan.ChineseSimplified)
         {
@@ -704,6 +724,12 @@ public class Auxiliary : Regist
 
                 return OmitNumberStr(accuracy, str) + "万亿";
             }
+            else
+            {
+                string str = (longValue / Amount.万亿).ToString();
+
+                return OmitNumberStr(accuracy, str) + "万亿";
+            }
         }
         else if (ManaLan.CurrentLan == Lan.ChineseTraditional)
         {
@@ -729,9 +755,17 @@ public class Auxiliary : Regist
 
                 return OmitNumberStr(accuracy, str) + "萬億";
             }
-        }
+            else
+            {
+                string str = (longValue / Amount.万亿).ToString();
 
-        throw new Exception();
+                return OmitNumberStr(accuracy, str) + "萬億";
+            }
+        }
+        else
+        {
+            throw new Exception();
+        }
     }
 
 

+ 3 - 1
ToList.txt

@@ -2,11 +2,13 @@
 
 //关闭调试界面
 
-//关闭调试按键
+关闭调试按键
 
 //注意存档覆盖情况
 
 //打包时重新导入配置
 
+更新版本号
+
 
 监督补上循环特效