コード例 #1
0
 internal bool AddUserToImages(int score, UserInfo user)
 {
     if (null != user)
     {
         while (m_UsableImages.ContainsKey(score))
         {
             ++score;
         }
         ExpeditionImageInfo image_info = new ExpeditionImageInfo(user);
         image_info.FightingScore = score;
         m_UsableImages.Add(score, image_info);
     }
     return true;
 }
コード例 #2
0
ファイル: UITreasureSlot.cs プロジェクト: Klanly/UnityClient
 public void SetLevelInfo(ExpeditionImageInfo enemy_info)
 {
     if (enemy_info != null)
     {
         if (lblFighting != null)
         {
             lblFighting.text = ((int)enemy_info.FightingScore).ToString();
         }
         if (lblLevel != null)
         {
             lblLevel.text = "Lv." + enemy_info.Level.ToString();
         }
         if (lblName != null)
         {
             lblName.text = enemy_info.Nickname;
         }
         Data_PlayerConfig playerCfg = PlayerConfigProvider.Instance.GetPlayerConfigById(enemy_info.HeroId);
         if (playerCfg != null && spPortrait != null)
         {
             spPortrait.spriteName = playerCfg.m_Portrait;
         }
     }
 }