private void IsLM(VictPlayerType isLM) { if (isLM == VictPlayerType.LM) { return; } UIWidget[] componentsInChildren = base.transform.GetComponentsInChildren <UIWidget>(); if (componentsInChildren == null) { return; } for (int i = 0; i < componentsInChildren.Length; i++) { if (componentsInChildren[i].pivot == UIWidget.Pivot.Left) { componentsInChildren[i].pivot = UIWidget.Pivot.Center; componentsInChildren[i].transform.localEulerAngles = new Vector3(0f, 180f, 0f); componentsInChildren[i].pivot = UIWidget.Pivot.Right; } else { componentsInChildren[i].transform.localEulerAngles = new Vector3(0f, 180f, 0f); } } }
public void UpdateInfo(HeroData data, VictPlayerType type, VictPlayerData playerData, bool isSelf = false) { this.P_SummonerName.text = playerData.SummonerName; this.P_KillHero.text = playerData.KillHero.ToString(); this.P_KillMonster.text = this.ThousandFormat(playerData.Gold); this.P_Kill.text = playerData.Death.ToString(); this.P_KillAssist.text = playerData.KillAssist.ToString(); this.P_Frame.gameObject.SetActive(isSelf); if (playerData.FirstKill) { this.Sign.gameObject.SetActive(true); } }
public void UpdateInfo(HeroData data, VictPlayerType type, VictPlayerData playerData, bool isSelf = false) { isSelf = playerData.IsControlPlayer; this.P_HeroLevel.text = data.LV.ToString(); SysHeroMainVo heroMainData = BaseDataMgr.instance.GetHeroMainData(data.HeroID); if (LevelManager.Instance.IsPvpBattleType) { this.P_SummonerName.text = playerData.SummonerName; } else { this.P_SummonerName.text = LanguageManager.Instance.GetStringById(heroMainData.name); } this.SetIsHighestKillHero(playerData.isHighestKillHero); this.SetIsHighestKillMonster(playerData.isHighestKillMonster); this.P_KillHero.text = playerData.KillHero.ToString(); this.P_KillMonster.text = playerData.KillMonster.ToString(); this.P_Kill.text = "/" + playerData.Death.ToString(); this.P_KillAssist.text = "/" + playerData.KillAssist.ToString(); if (isSelf) { this.P_SummonerName.color = new Color(0.9647059f, 0.9019608f, 0.360784322f); } else { this.P_SummonerName.color = Color.white; } if (playerData.LastChamRank <= 50) { this.P_SummonerName.gameObject.GetComponent <AllochroicLabelChecker>().RenderLabel(playerData.LastChamRank); } if (playerData.SelfIsDeath) { if (this.P_BG2 != null) { this.P_BG2.gameObject.SetActive(true); } if (this.LeftDeathTimeLabel != null) { this.LeftDeathTimeLabel.text = playerData.LeftDeathTime.ToString(); } } else if (this.P_BG2 != null) { this.P_BG2.gameObject.SetActive(false); } this.CheckEquipment(playerData); }
public void Init(HeroData data, VictPlayerType type, VictPlayerData playerData, bool isSelf = false, bool isFriend = false) { this.mPlayerData = playerData; this._IsAlly = Singleton <PvpManager> .Instance.IsOurPlayer(int.Parse(playerData.UserID)); this.playerType = type; NGUITools.SetActiveChildren(this.P_HeroItem, false); GameObject gameObject = NGUITools.AddChild(this.P_HeroItem, Resources.Load <GameObject>("Prefab/NewUI/SelectHero/SelectHeroItem")); NewHeroItem component = gameObject.GetComponent <NewHeroItem>(); component.Init(data, NewHeroItem.CardType.HeroAvator, true, true); gameObject.name = data.HeroID; if (isSelf) { this.P_SummonerName.color = new Color32(253, 173, 41, 255); } this.P_SummonerName.text = playerData.SummonerName; if (playerData.LastChamRank <= 50) { this.P_SummonerName.gameObject.GetComponent <AllochroicLabelChecker>().RenderLabel(playerData.LastChamRank); } this.P_KillHero.text = playerData.KillHero.ToString(); this.P_KillMonster.text = this.ThousandFormat(playerData.Gold); this.P_Kill.text = playerData.Death.ToString(); this.P_KillAssist.text = playerData.KillAssist.ToString(); if (Singleton <PvpManager> .Instance.IsObserver || ((LevelManager.m_CurLevel.IsFightWithRobot() || LevelManager.m_CurLevel.IsBattleNewbieGuide()) && type == VictPlayerType.BL)) { this.P_AddFriend.gameObject.SetActive(false); this.P_AddGood.gameObject.SetActive(false); } else { this.P_AddFriend.gameObject.SetActive(!isSelf && !isFriend); this.P_AddFriend.name = playerData.SummonerId; this.P_AddGood.gameObject.SetActive(!isSelf); this.P_AddGood.name = playerData.UserID; } this.RegisteListener(); this.SetEquipment(playerData); if (playerData.FirstKill) { this.Sign.gameObject.SetActive(true); } this.P_MvpIcon.SetActive(ModelManager.Instance.Get_Settle_MvpUserId() == playerData.UserID); }
public void Init(VictPlayerType side, HeroData data, VictPlayerType type, VictPlayerData playerData, bool isSelf = false, bool isFriend = false) { if (side == type) { this.P_Frame.color = new Color32(7, 154, 0, 255); this.P_BG2.color = new Color32(0, 154, 91, 171); } else { this.P_Frame.color = new Color32(222, 0, 0, 255); this.P_BG2.color = new Color32(132, 5, 5, 171); } isSelf = playerData.IsControlPlayer; SysHeroMainVo heroMainData = BaseDataMgr.instance.GetHeroMainData(data.HeroID); this.P_HeroPic.spriteName = heroMainData.avatar_icon; if (LevelManager.Instance.IsPvpBattleType) { this.P_SummonerName.text = playerData.SummonerName; this.P_SummonerSkill.gameObject.SetActive(true); SysSkillMainVo skillMainData = BaseDataMgr.instance.GetSkillMainData(playerData.SummonerSkillID); if (skillMainData != null) { this.P_SummonerSkill.mainTexture = ResourceManager.Load <Texture>(skillMainData.skill_icon, true, true, null, 0, false); } else { this.P_SummonerSkill.gameObject.SetActive(false); } } else { this.P_SummonerName.text = LanguageManager.Instance.GetStringById(heroMainData.name); this.P_SummonerSkill.gameObject.SetActive(false); } this.SetIsHighestKillHero(playerData.isHighestKillHero); this.SetIsHighestKillMonster(playerData.isHighestKillMonster); this.P_HeroLevel.text = data.LV.ToString(); this.P_HeroPic.parent.name = data.HeroID; this.P_KillHero.text = playerData.KillHero.ToString(); this.P_KillMonster.text = playerData.KillMonster.ToString(); this.P_Kill.text = "/" + playerData.Death.ToString(); this.P_KillAssist.text = "/" + playerData.KillAssist.ToString(); this.P_BG1.gameObject.SetActive(isSelf); if (isSelf) { this.P_SummonerName.color = new Color(0.9647059f, 0.9019608f, 0.360784322f); } else { this.P_SummonerName.color = Color.white; } if (playerData.SelfIsDeath && !GameManager.IsGameOver()) { this.P_BG2.gameObject.SetActive(true); this.LeftDeathTimeLabel.text = playerData.LeftDeathTime.ToString(); } else { this.P_BG2.gameObject.SetActive(false); } this.P_AddFriend.gameObject.SetActive(!isSelf && !isFriend); this.P_AddFriend.name = playerData.SummonerId; UIEventListener.Get(this.P_AddFriend.gameObject).onClick = new UIEventListener.VoidDelegate(this.ClickAddFriend); this.CheckEquipment(playerData); if (this.SilencedIcon != null) { UIEventListener.Get(this.SilencedIcon.gameObject).onClick = new UIEventListener.VoidDelegate(this.ClickBlock); if (Singleton <StatisticView> .Instance.blockedSummonerList.Contains(playerData.SummonerId)) { this.SilencedOn(true); } else { this.SilencedOn(false); } if (!isSelf && side == type) { this.SilencedIcon.gameObject.SetActive(true); } else { this.SilencedIcon.gameObject.SetActive(false); } } if (playerData.LastChamRank <= 50) { this.P_SummonerName.gameObject.GetComponent <AllochroicLabelChecker>().RenderLabel(playerData.LastChamRank); } }