using Excel2Json; using Fort23.Core; using Fort23.UTool; using UnityEditor; using UnityEngine; namespace GameUI { public class GameApplctionMono : MonoBehaviour { public GameApplction GameApplction; public void Update() { #if UNITY_EDITOR // if (EditorApplication.isPaused) // { // return; // } #endif EventSystem.Instance.Update(); AssetBundleLoadManager.Instance.UpdateBundle(); TimeHelper.clientFrame = TimeHelper.ClientFrame() + (long)(Time.deltaTime * 1000); } private class TestHERO { public int level; public int exp; public void AddExp(int e) { this.exp += e; HeroPowerUpConfig allPowerUp = ConfigComponent.Instance.Get(level); while (exp>allPowerUp.levelUpExp&&allPowerUp.levelUpExp>0) { exp=exp-allPowerUp.levelUpExp; level++; allPowerUp = ConfigComponent.Instance.Get(level); } } } [ContextMenu("monster")] public void Test() { LevelBattleConfig[] levelBattleConfigs = ConfigComponent.Instance.GetAll(); TestHERO testHero = new TestHERO(); testHero.level = 1; string m = ""; for (int i = 0; i < levelBattleConfigs.Length; i++) { LevelBattleConfig levelBattleConfig = levelBattleConfigs[i]; int jy = levelBattleConfig.exp * levelBattleConfig.miniExpAndGold[0] / 4; testHero.AddExp(jy); m += testHero.level + "\n"; } Debug.Log(m); } public void LateUpdate() { EventSystem.Instance.LateUpdate(); } } }