void InitPlayerInfo() { PlayerState state = userPackage.GetPlayerState(); bloodProgess.value = (float)state.blood / (float)(20 + 2 * state.health); bloodLabel.text = string.Format("{0}/{1}", state.blood, 20 + 2 * state.health); hungerProgress.value = (float)state.hunger / (float)(20 + 2 * state.health); hungerLabel.text = string.Format("{0}/{1}", state.hunger, 20 + 2 * state.health); thirstProgress.value = (float)state.thirst / (float)(20 + 2 * state.health); thirstLabel.text = string.Format("{0}/{1}", state.thirst, 20 + 2 * state.health); interestLabel.text = string.Format("分配比例:{0:f}%", (float)userPackage.GetPlayerInterest() * 100); resLabel.text = GlobalFunction.NumberFormat(itemPackage.GetResourceTotolNumber()); moneyLabel.text = GlobalFunction.NumberFormat(itemPackage.GetGoldNumber()); elecLabel.text = string.Format("{0}/h", GlobalFunction.NumberFormat(sanctuaryPackage.GetTotalProEfficiency())); attackLabel.text = state.attack.ToString(); defenseLable.text = state.defense.ToString(); agileLabel.text = state.agile.ToString(); speedLabel.text = state.speed.ToString(); intellectLabel.text = state.intellect.ToString(); healthLabel.text = state.health.ToString(); moodLabel.text = state.mood.ToString(); loadLabel.text = "0"; float progress; userPackage.GetPlayerLevel(out progress); expProgress.value = progress; levelLabel.text = string.Format("Lv.{0}", userPackage.GetPlayerLevel()); expLabel.text = string.Format("个人实力:{0}", userPackage.GetPersonContribution()); nameLabel.text = userPackage.GetUserInfo(userPackage.UserID).name; }