using FairyGUI; using ET; using System.Collections.Generic; namespace GFGGame { public class RoleDataManager { public static bool powerTimeServerLock; public static long roleId; public static string roleName; public static int rechargeTotalMon { get { return GameGlobal.myNumericComponent.GetAsInt(NumericType.RechargeTotaMonthly); } } public static string slogan = ""; public static int headId { get { return 5000001; } } public static int headBorderId { get { return 5005001; } } public static int power { get { return GameGlobal.myNumericComponent.GetAsInt(NumericType.Power); } } public static int gold { get { return ItemDataManager.GetItemNum(ConstItemID.GOLD); //GameGlobal.myNumericComponent.GetAsInt(NumericType.Gold); } } public static int exp { get { return GameGlobal.myNumericComponent.GetAsInt(NumericType.Exp); } } public static int lvl { get { return GameGlobal.myNumericComponent.GetAsInt(NumericType.Lvl); } } public static int diaP { get { return ItemDataManager.GetItemNum(ConstItemID.DIAMOND_PURPLE); // GameGlobal.myNumericComponent.GetAsInt(NumericType.DiamondP); } } public static int diaR { get { return ItemDataManager.GetItemNum(ConstItemID.DIAMOND_RED); //GameGlobal.myNumericComponent.GetAsInt(NumericType.DiamondR); } } public static int Liveness { get { return GameGlobal.myNumericComponent.GetAsInt(NumericType.Liveness); } } public static bool CheckPowerFull() { return RoleDataManager.power >= GameGlobal.myNumericComponent.GetAsInt(NumericType.PowerLimit); } public static void InitServerData() { roleName = GameGlobal.zoneScene.GetComponent().GetCurrentRoleName(); roleId = GameGlobal.zoneScene.GetComponent().CurrentRoleId; } private static int oldLvValue; public static void RoleLvUp(int oldValue) { oldLvValue = oldValue; Timers.inst.Remove(CheckUpLv); Timers.inst.Remove(OpenRoleLvUpView); Timers.inst.Add(0.2f, 0, CheckUpLv); CheckUpLv(null); } private static void CheckUpLv(object param) { if (GuideDataManager.currentGuideId > 0) return; if (ViewManager.isViewOpen(typeof(FunctionOpenView).Name)) return;//等功能开启展示完成后再展示角色升级 if (ViewManager.isViewOpen(typeof(StoryFightSingleScoreView).Name)) return;//战斗界面关闭前不弹升级 if (ViewManager.isViewOpen(typeof(StoryFightTargetScoreView).Name)) return;//战斗界面关闭前不弹升级 if (InstanceZonesDataManager.isQuicklyFighting == true) return;//速刷中不弹 if (InstanceZonesDataManager.isResultFighting == true) return;//结算中经验进度结束前不弹 OpenRoleLvUpView(null); } private static void OpenRoleLvUpView(object param) { ViewManager.Show(oldLvValue); Timers.inst.Remove(CheckUpLv); } } }