public void Init(pd_WorldBossPlayerInfo info, bool selected) { m_WorldBossInfo = info; m_labelRank.text = info.rank.ToString(); m_labelRank.gameObject.SetActive(true); m_SpriteRank.gameObject.SetActive(false); if (info.rank <= 3) { m_SpriteRank.spriteName = string.Format("arena_ranking_{0}", info.rank); m_labelRank.gameObject.SetActive(false); m_SpriteRank.gameObject.SetActive(true); } else { m_labelRank.text = info.rank.ToString(); m_labelRank.gameObject.SetActive(true); m_SpriteRank.gameObject.SetActive(false); } m_labelMessage.text = Localization.Format("WorldBossBestInBattle", info.score); if (m_Profile == null) { m_Profile = NGUITools.AddChild(m_ProfileIndicator, m_ProfilePrefab).GetComponent <PlayerProfile>(); } m_Profile.UpdateProfile(info.leader_creature, info.nickname, info.player_level); // #if !UNITY_EDITOR // if (selected == true) // { // m_BtnDetail.GetComponent<BoxCollider2D>().enabled = false; // m_BtnDetail.SetState(UIButtonColor.State.Disabled, true); // m_BtnDetail.enabled = false; // } // else // #endif // { // m_BtnDetail.GetComponent<BoxCollider2D>().enabled = true; // m_BtnDetail.SetState(UIButtonColor.State.Normal, true); // m_BtnDetail.enabled = true; // } m_BG.SetSpriteActive(selected); }
public void Init(pd_WorldBossPlayerInfo player_info, TeamData team_data) { m_Profile.UpdateProfile(player_info.leader_creature, player_info.nickname, player_info.player_level); m_LeaderSkill.Init(team_data.LeaderCreature, team_data.UseLeaderSkillType); m_BG.SetSpriteActive(player_info.account_idx == SHSavedData.AccountIdx); m_LabelMessage.text = Localization.Format("WorldBossBestInBattle", player_info.score); m_LabelRank.text = Localization.Format("PVPRank", player_info.rank); foreach (var hero in team_data.Creatures.Select(c => c.creature)) { DungeonHero hero_item = m_HeroManager.GetNewObject <DungeonHero>(m_GridHeroes.transform, Vector3.zero); hero_item.Init(hero, false, false); hero_item.m_icon.flip = UIBasicSprite.Flip.Horizontally; } m_GridHeroes.Reposition(); m_LabelTeamPower.text = Localization.Format("PowerValue", team_data.Power); }