From c49c0e39e4c11a438014a0b0732ecf0968fceb5e Mon Sep 17 00:00:00 2001
From: chenxin <chenxin6991@163.com>
Date: Fri, 27 Nov 2020 20:58:36 +0800
Subject: [PATCH] 出二级宝石的时间不对的bug

---
 GemBattle/宝石塔防_Data/Managed/UnityEngine.UI.dll                           |    0 
 Assets/Scripts/TowerDefense/UI/GM.cs                                     |    6 +++---
 GemBattle/宝石塔防_Data/Managed/Assembly-CSharp-firstpass.dll                |    0 
 GemBattle/宝石塔防_Data/Managed/Unity.TextMeshPro.dll                        |    0 
 GemBattle/宝石塔防_Data/Managed/Sirenix.OdinInspector.CompatibilityLayer.dll |    0 
 GemBattle/宝石塔防_Data/resources.assets                                     |    0 
 And/GemBattle.apk                                                        |    0 
 Assets/Scripts/Json/JsonDataCenter.cs                                    |    7 +++----
 Assets/Scripts/TowerDefense/Level/JsonDataInit.cs                        |    2 +-
 Assets/Scripts/TowerDefense/UI/HUD/EndlessRandomTower.cs                 |    5 +----
 GemBattle/宝石塔防_Data/globalgamemanagers                                   |    0 
 GemBattle/宝石塔防_Data/Managed/MoreMountains.NiceVibrations.Demos.dll       |    0 
 GemBattle.zip                                                            |    0 
 Assets/Materials/UI/tileTowerVSMat.mat                                   |    2 +-
 GemBattle/宝石塔防_Data/level1                                               |    0 
 GemBattle/宝石塔防_Data/Managed/Assembly-CSharp.dll                          |    0 
 GemBattle/宝石塔防_Data/Managed/MoreMountains.NiceVibrations.dll             |    0 
 GemBattle/宝石塔防_Data/Managed/Unity.Timeline.dll                           |    0 
 GemBattle/宝石塔防_Data/Managed/MoreMountains.NiceVibrations.Haptics.dll     |    0 
 19 files changed, 9 insertions(+), 13 deletions(-)

diff --git a/And/GemBattle.apk b/And/GemBattle.apk
index 6879963..bc70ad3 100644
--- a/And/GemBattle.apk
+++ b/And/GemBattle.apk
Binary files differ
diff --git a/Assets/Materials/UI/tileTowerVSMat.mat b/Assets/Materials/UI/tileTowerVSMat.mat
index 29c24ee..55eec8c 100644
--- a/Assets/Materials/UI/tileTowerVSMat.mat
+++ b/Assets/Materials/UI/tileTowerVSMat.mat
@@ -40,7 +40,7 @@
         m_Scale: {x: 1, y: 1}
         m_Offset: {x: 0, y: 0}
     - _MainTex:
-        m_Texture: {fileID: 2800000, guid: 93f40a01d57fbff418fc0b54b6ab7d9f, type: 3}
+        m_Texture: {fileID: 2800000, guid: ea2ffef66c52dd14fbd46187be79f107, type: 3}
         m_Scale: {x: 1, y: 1}
         m_Offset: {x: 0, y: 0}
     - _MetallicGlossMap:
diff --git a/Assets/Scripts/Json/JsonDataCenter.cs b/Assets/Scripts/Json/JsonDataCenter.cs
index 94b3685..ed2ea37 100644
--- a/Assets/Scripts/Json/JsonDataCenter.cs
+++ b/Assets/Scripts/Json/JsonDataCenter.cs
@@ -55,6 +55,8 @@
         // Svn版本信息.
         public static string SVNVERSION_INFO = "";
 
+        public static float DOUBLE_GEM_TIME = 10f;
+
         /// <summary>
         /// 根据id和Level获取skillLevelInfo数据
         /// </summary>
@@ -188,10 +190,7 @@
                         break;
                     case "doublegem":
                         // 购买宝石直接获取2级宝石的时间
-                        if (RandomTower.instanceExists)
-                            RandomTower.LEVELUP_TOWER_TIME = tbat.value;
-                        else if (EndlessRandomTower.instanceExists)
-                            EndlessRandomTower.LEVELUP_TOWER_TIME = tbat.value;
+                        DOUBLE_GEM_TIME = tbat.value;
                         break;
                     case "buildtime":
                         GRIDOPEN_CDTIME = tbat.value;
diff --git a/Assets/Scripts/TowerDefense/Level/JsonDataInit.cs b/Assets/Scripts/TowerDefense/Level/JsonDataInit.cs
index f4480d2..e2c93bd 100644
--- a/Assets/Scripts/TowerDefense/Level/JsonDataInit.cs
+++ b/Assets/Scripts/TowerDefense/Level/JsonDataInit.cs
@@ -4,7 +4,7 @@
 
 public class JsonDataInit : MonoBehaviour
 {
-    private void OnEnable()
+    private void Awake()
     {
         JsonDataCenter.allData = new Dictionary<string, List<tabledata>>();
         JsonDataReader.Instance.StartRead(JsonDataCenter.ProcessInitDataLoad);
diff --git a/Assets/Scripts/TowerDefense/UI/GM.cs b/Assets/Scripts/TowerDefense/UI/GM.cs
index cbe0a6e..31142d3 100644
--- a/Assets/Scripts/TowerDefense/UI/GM.cs
+++ b/Assets/Scripts/TowerDefense/UI/GM.cs
@@ -58,7 +58,7 @@
             Tower aTower = EndlessRandomTower.instance.getTowerByName("CopyCatTower");
             int level = 0;
 
-            if (EndlessUIStart.instance.GameStartTime >= EndlessRandomTower.LEVELUP_TOWER_TIME)
+            if (EndlessUIStart.instance.GameStartTime >= JsonDataCenter.DOUBLE_GEM_TIME)
             {
                 level = Mathf.Min(EndlessGameUI.instance.MinLevel, 1);
             }
@@ -74,7 +74,7 @@
             Tower aTower = EndlessRandomTower.instance.getTowerByName("GrowUpTower");
             int level = 0;
 
-            if (EndlessUIStart.instance.GameStartTime >= EndlessRandomTower.LEVELUP_TOWER_TIME)
+            if (EndlessUIStart.instance.GameStartTime >= JsonDataCenter.DOUBLE_GEM_TIME)
             {
                 level = Mathf.Min(EndlessGameUI.instance.MinLevel, 1);
             }
@@ -90,7 +90,7 @@
             Tower aTower = EndlessRandomTower.instance.getTowerByName("BlinkTower");
             int level = 0;
 
-            if (EndlessUIStart.instance.GameStartTime >= EndlessRandomTower.LEVELUP_TOWER_TIME)
+            if (EndlessUIStart.instance.GameStartTime >= JsonDataCenter.DOUBLE_GEM_TIME)
             {
                 level = Mathf.Min(EndlessGameUI.instance.MinLevel, 1);
             }
diff --git a/Assets/Scripts/TowerDefense/UI/HUD/EndlessRandomTower.cs b/Assets/Scripts/TowerDefense/UI/HUD/EndlessRandomTower.cs
index 820ccad..37e9c8a 100644
--- a/Assets/Scripts/TowerDefense/UI/HUD/EndlessRandomTower.cs
+++ b/Assets/Scripts/TowerDefense/UI/HUD/EndlessRandomTower.cs
@@ -39,9 +39,6 @@
     // 开始出现技能塔的时间:
     public static float SKILL_TOWER_TIME = 30.0f;
 
-    // 购买之后直接出现2级宝石的时间.
-    public static float LEVELUP_TOWER_TIME = 10.0f;
-
     protected System.Random mRandom;
 
     protected int rTowerIdx = 2;
@@ -291,7 +288,7 @@
         if (gameUI.isBuilding)
             gameUI.CancelGhostPlacement();
 
-        if (EndlessUIStart.instance.GameStartTime >= LEVELUP_TOWER_TIME)
+        if (EndlessUIStart.instance.GameStartTime >= JsonDataCenter.DOUBLE_GEM_TIME)
         {
             if (level == -1)
                 level = Mathf.Min(EndlessGameUI.instance.MinLevel, 1);
diff --git a/GemBattle.zip b/GemBattle.zip
index 30b741f..1581219 100644
--- a/GemBattle.zip
+++ b/GemBattle.zip
Binary files differ
diff --git "a/GemBattle/\345\256\235\347\237\263\345\241\224\351\230\262_Data/Managed/Assembly-CSharp-firstpass.dll" "b/GemBattle/\345\256\235\347\237\263\345\241\224\351\230\262_Data/Managed/Assembly-CSharp-firstpass.dll"
index d9acc64..c79a8ad 100644
--- "a/GemBattle/\345\256\235\347\237\263\345\241\224\351\230\262_Data/Managed/Assembly-CSharp-firstpass.dll"
+++ "b/GemBattle/\345\256\235\347\237\263\345\241\224\351\230\262_Data/Managed/Assembly-CSharp-firstpass.dll"
Binary files differ
diff --git "a/GemBattle/\345\256\235\347\237\263\345\241\224\351\230\262_Data/Managed/Assembly-CSharp.dll" "b/GemBattle/\345\256\235\347\237\263\345\241\224\351\230\262_Data/Managed/Assembly-CSharp.dll"
index dffdf82..78739d2 100644
--- "a/GemBattle/\345\256\235\347\237\263\345\241\224\351\230\262_Data/Managed/Assembly-CSharp.dll"
+++ "b/GemBattle/\345\256\235\347\237\263\345\241\224\351\230\262_Data/Managed/Assembly-CSharp.dll"
Binary files differ
diff --git "a/GemBattle/\345\256\235\347\237\263\345\241\224\351\230\262_Data/Managed/MoreMountains.NiceVibrations.Demos.dll" "b/GemBattle/\345\256\235\347\237\263\345\241\224\351\230\262_Data/Managed/MoreMountains.NiceVibrations.Demos.dll"
index 03f5f28..babdf0d 100644
--- "a/GemBattle/\345\256\235\347\237\263\345\241\224\351\230\262_Data/Managed/MoreMountains.NiceVibrations.Demos.dll"
+++ "b/GemBattle/\345\256\235\347\237\263\345\241\224\351\230\262_Data/Managed/MoreMountains.NiceVibrations.Demos.dll"
Binary files differ
diff --git "a/GemBattle/\345\256\235\347\237\263\345\241\224\351\230\262_Data/Managed/MoreMountains.NiceVibrations.Haptics.dll" "b/GemBattle/\345\256\235\347\237\263\345\241\224\351\230\262_Data/Managed/MoreMountains.NiceVibrations.Haptics.dll"
index b717930..fbd3d3d 100644
--- "a/GemBattle/\345\256\235\347\237\263\345\241\224\351\230\262_Data/Managed/MoreMountains.NiceVibrations.Haptics.dll"
+++ "b/GemBattle/\345\256\235\347\237\263\345\241\224\351\230\262_Data/Managed/MoreMountains.NiceVibrations.Haptics.dll"
Binary files differ
diff --git "a/GemBattle/\345\256\235\347\237\263\345\241\224\351\230\262_Data/Managed/MoreMountains.NiceVibrations.dll" "b/GemBattle/\345\256\235\347\237\263\345\241\224\351\230\262_Data/Managed/MoreMountains.NiceVibrations.dll"
index f7541b8..8777ff1 100644
--- "a/GemBattle/\345\256\235\347\237\263\345\241\224\351\230\262_Data/Managed/MoreMountains.NiceVibrations.dll"
+++ "b/GemBattle/\345\256\235\347\237\263\345\241\224\351\230\262_Data/Managed/MoreMountains.NiceVibrations.dll"
Binary files differ
diff --git "a/GemBattle/\345\256\235\347\237\263\345\241\224\351\230\262_Data/Managed/Sirenix.OdinInspector.CompatibilityLayer.dll" "b/GemBattle/\345\256\235\347\237\263\345\241\224\351\230\262_Data/Managed/Sirenix.OdinInspector.CompatibilityLayer.dll"
index 8539c78..7258b92 100644
--- "a/GemBattle/\345\256\235\347\237\263\345\241\224\351\230\262_Data/Managed/Sirenix.OdinInspector.CompatibilityLayer.dll"
+++ "b/GemBattle/\345\256\235\347\237\263\345\241\224\351\230\262_Data/Managed/Sirenix.OdinInspector.CompatibilityLayer.dll"
Binary files differ
diff --git "a/GemBattle/\345\256\235\347\237\263\345\241\224\351\230\262_Data/Managed/Unity.TextMeshPro.dll" "b/GemBattle/\345\256\235\347\237\263\345\241\224\351\230\262_Data/Managed/Unity.TextMeshPro.dll"
index 36275b1..2ed0ba6 100644
--- "a/GemBattle/\345\256\235\347\237\263\345\241\224\351\230\262_Data/Managed/Unity.TextMeshPro.dll"
+++ "b/GemBattle/\345\256\235\347\237\263\345\241\224\351\230\262_Data/Managed/Unity.TextMeshPro.dll"
Binary files differ
diff --git "a/GemBattle/\345\256\235\347\237\263\345\241\224\351\230\262_Data/Managed/Unity.Timeline.dll" "b/GemBattle/\345\256\235\347\237\263\345\241\224\351\230\262_Data/Managed/Unity.Timeline.dll"
index 95d931c..b692648 100644
--- "a/GemBattle/\345\256\235\347\237\263\345\241\224\351\230\262_Data/Managed/Unity.Timeline.dll"
+++ "b/GemBattle/\345\256\235\347\237\263\345\241\224\351\230\262_Data/Managed/Unity.Timeline.dll"
Binary files differ
diff --git "a/GemBattle/\345\256\235\347\237\263\345\241\224\351\230\262_Data/Managed/UnityEngine.UI.dll" "b/GemBattle/\345\256\235\347\237\263\345\241\224\351\230\262_Data/Managed/UnityEngine.UI.dll"
index c07c4ff..bc63d8f 100644
--- "a/GemBattle/\345\256\235\347\237\263\345\241\224\351\230\262_Data/Managed/UnityEngine.UI.dll"
+++ "b/GemBattle/\345\256\235\347\237\263\345\241\224\351\230\262_Data/Managed/UnityEngine.UI.dll"
Binary files differ
diff --git "a/GemBattle/\345\256\235\347\237\263\345\241\224\351\230\262_Data/globalgamemanagers" "b/GemBattle/\345\256\235\347\237\263\345\241\224\351\230\262_Data/globalgamemanagers"
index 0f35d83..788975f 100644
--- "a/GemBattle/\345\256\235\347\237\263\345\241\224\351\230\262_Data/globalgamemanagers"
+++ "b/GemBattle/\345\256\235\347\237\263\345\241\224\351\230\262_Data/globalgamemanagers"
Binary files differ
diff --git "a/GemBattle/\345\256\235\347\237\263\345\241\224\351\230\262_Data/level1" "b/GemBattle/\345\256\235\347\237\263\345\241\224\351\230\262_Data/level1"
index bc0b6a1..1a7b9d4 100644
--- "a/GemBattle/\345\256\235\347\237\263\345\241\224\351\230\262_Data/level1"
+++ "b/GemBattle/\345\256\235\347\237\263\345\241\224\351\230\262_Data/level1"
Binary files differ
diff --git "a/GemBattle/\345\256\235\347\237\263\345\241\224\351\230\262_Data/resources.assets" "b/GemBattle/\345\256\235\347\237\263\345\241\224\351\230\262_Data/resources.assets"
index 9a0edb6..2b575f2 100644
--- "a/GemBattle/\345\256\235\347\237\263\345\241\224\351\230\262_Data/resources.assets"
+++ "b/GemBattle/\345\256\235\347\237\263\345\241\224\351\230\262_Data/resources.assets"
Binary files differ

--
Gitblit v1.9.1