public static PersonalInfoData Instance() { if (instance == null) { instance = new PersonalInfoData(); } return(instance); }
public void SetCurrentDate() { NameLabel.text = PersonalInfoData.Instance().gameNick; GameInnsLabel.text = PersonalInfoData.Instance().gameCount; LevelLabel.text = PersonalInfoData.Instance().gameLevel; WinInnsLabel.text = PersonalInfoData.Instance().gameWinCount; KillNumLabel.text = PersonalInfoData.Instance().gameKillCount; BuildingDemoliLabel.text = PersonalInfoData.Instance().gameBuildingDestroyCount; DeadNumLabel.text = PersonalInfoData.Instance().gameDeadCount; AchievNumLabel.text = PersonalInfoData.Instance().gameAchieveCount + "/" + PersonalInfoData.Instance().gameMaxAchieve; int Exp = Convert.ToInt32(PersonalInfoData.Instance().gameExp); int MaxExp = Convert.ToInt32(PersonalInfoData.Instance().gameMaxExp); float val = (float)Exp / (float)MaxExp; ExpSlier.value = val; ExpLabel.text = Exp + "/" + MaxExp; HeadIcon.spriteName = PersonalInfoData.Instance().headId.ToString(); }