예제 #1
0
 void ShowHallInfo()
 {
     if (GameCenter.guildMng.MyGuildInfo != null)
     {
         GuildRef guildRef = GameCenter.guildMng.MyGuildInfo.CurGuildRef;
         if (guildRef == null)
         {
             return;
         }
         int guildLevel = GameCenter.guildMng.MyGuildInfo.GuildLv;
         int totalExp   = guildRef.exp;
         int curExp     = GameCenter.guildMng.MyGuildInfo.GuildExp;
         int expDiff    = totalExp - curExp;
         if (labGuildExpDes != null)
         {
             labGuildExpDes.text = (guildLevel < guildMaxLevel)?string.Format(guildExpDes, guildLevel, expDiff, guildLevel + 1):string.Format(guildMaxLevelDes, guildLevel);
         }
         if (labGuildExpNum != null)
         {
             labGuildExpNum.text = curExp + "/" + totalExp;
         }
         if (pbGuildExp != null)
         {
             pbGuildExp.value = (float)curExp / (float)totalExp;
         }
         if (canGetFx != null)
         {
             canGetFx.SetActive(GameCenter.guildMng.HaveRewardCanGet);
         }
     }
 }
예제 #2
0
    void ShowGuildInfo()
    {
        GuildInfo guildInfo = GameCenter.guildMng.MyGuildInfo;

        if (guildInfo != null)
        {
            GuildRef guildRef = GameCenter.guildMng.MyGuildInfo.CurGuildRef;
            if (labGuildName != null)
            {
                labGuildName.text = guildInfo.GuildName;
            }
            if (labGuildLeader != null)
            {
                labGuildLeader.text = guildInfo.PresidentName;
            }
            if (labGuildMemCount != null && guildRef != null)
            {
                labGuildMemCount.text = guildInfo.MemberNum.ToString() + "/" + (guildInfo.MemberMaxCount);
            }
            if (labGuildRanking != null)
            {
                labGuildRanking.text = guildInfo.GuildRank.ToString();
            }
            if (labGuildNotice != null)
            {
                labGuildNotice.value = guildInfo.Notice;
            }
        }
    }