private void AddPlayerEnemy(IPlayer pl) { EnemyHeadInfo info = GetEmptyHeadInfo(pl); if (info == null) { return; } info.OpenInfo(pl); //打开目标 info.OnUpdateHp(); //更新敌人窗口的hp if (PlayerManager.Instance.LocalPlayer.SyncLockTarget == null) { return; } if (PlayerManager.Instance.LocalPlayer.SyncLockTarget.GameObjGUID != info.Player.GameObjGUID) { return; } EnemySelect(info, true);//设置选中状态(选中时头像显示光圈) }
void EnemySelect(EnemyHeadInfo info, bool select) { info.OnSelect(select); }