From 716dde77b1c6f1d643032996f551a896e8758b56 Mon Sep 17 00:00:00 2001 From: wangguan <wangguan@kt007.com> Date: Sat, 12 Dec 2020 17:18:48 +0800 Subject: [PATCH] 读json --- Assets/Scripts/TowerDefense/UI/HUD/EndlessRandomTower.cs | 26 ++++++++++++++++++++++++-- 1 files changed, 24 insertions(+), 2 deletions(-) diff --git a/Assets/Scripts/TowerDefense/UI/HUD/EndlessRandomTower.cs b/Assets/Scripts/TowerDefense/UI/HUD/EndlessRandomTower.cs index 5379b09..d687d90 100644 --- a/Assets/Scripts/TowerDefense/UI/HUD/EndlessRandomTower.cs +++ b/Assets/Scripts/TowerDefense/UI/HUD/EndlessRandomTower.cs @@ -9,6 +9,7 @@ using TMPro; using KTGMGemClient; using DG.Tweening; +using System.Collections; public class EndlessRandomTower : Singleton<EndlessRandomTower> { @@ -57,11 +58,32 @@ public ParticleSystem btnPS; + IEnumerator ReadJson() + { + while (!GameConfig.JsonReadDone) + { + yield return 10; + } + + countDownLimit = JsonDataCenter.GetById<battle>(23).value; + Debug.Log("设置了倒计时:" + countDownLimit); + yield break; + } + // Start is called before the first frame update void Start() { - countDownLimit = JsonDataCenter.GetById<battle>(23).value; - //Debug.Log("设置了倒计时:" + countDownLimit); +#if UNITY_ANDROID + +#endif +#if UNITY_IPHONE + +#endif +#if UNITY_EDITOR + +#endif + StartCoroutine(ReadJson()); + if (!EndlessLevelManager.instanceExists) Debug.LogError("[UI] No level manager for tower list"); -- Gitblit v1.9.1