/// <summary> /// 设置头顶的ICON /// </summary> public override void SetHeadIcons(EHeadIcon icon_type) { TextNameBehavior textNameBehavoir = GetBehavior <TextNameBehavior>(); if (textNameBehavoir == null) { return; } textNameBehavoir.EnableBehaviors(mVisibleCtrl.VisibleMode == EVisibleMode.Visible /* && !IsDead()*/); if ((icon_type & EHeadIcon.TEAM) == EHeadIcon.TEAM) { string spriteName = ""; bool isShow = false; if (TeamManager.Instance.IsLeader(UID.obj_idx) == true) { spriteName = "MainWindow_New@TeamWindow@LeaderTag"; isShow = true; } else if (TeamManager.Instance.IsMember(UID.obj_idx) == true) { spriteName = "MainWindow_New@TeamWindow@MemberTag"; isShow = true; } textNameBehavoir.ShowTeamIcon(spriteName, isShow); } else if ((icon_type & EHeadIcon.PEAK) == EHeadIcon.PEAK) { bool isPeak = TransferHelper.IsPeak((uint)Level, TransferLv); textNameBehavoir.ShowPeakTeamIcon(isPeak); } }
/// <summary> /// 设置头顶的ICON /// </summary> public override void SetHeadIcons(EHeadIcon icon_type) { HeadIconsBehavior headIconBehavoir = GetBehavior <HeadIconsBehavior>(); if (headIconBehavoir == null) { return; } headIconBehavoir.EnableBehaviors(mVisibleCtrl.VisibleMode == EVisibleMode.Visible && !IsDead()); }
public override void SetHeadIcons(EHeadIcon icon_type) { base.SetHeadIcons(icon_type); GetBehavior <NpcHeadBehavior>().BuildIcons(); }