Пример #1
0
 void EnemySelect(EnemyHeadInfo info, bool select)
 {
     info.OnSelect(select);
     //foreach (EnemyHeadInfo hf in EnemyTeamList) {
     //    if(hf == info && info != null){
     //        hf.OnSelect(true);
     //    }else{
     //        hf.OnSelect(false);
     //    }
     //}
 }
Пример #2
0
        private void AddPlayerEnemy(Iplayer pl)
        {
            EnemyHeadInfo info = GetEmptyHeadInfo(pl);

            if (info == null)
            {
                //foreach(var item in EnemyTeamList)
                //    item.OnSelect(false);
                return;
            }
            //   RemovePlayerEnemy(pl);
            info.OpenInfo(pl);
            info.OnUpdateHp();
            if (PlayerManager.Instance.LocalPlayer.SyncLockTarget == null)
            {
                return;
            }
            if (PlayerManager.Instance.LocalPlayer.SyncLockTarget.GameObjGUID != info.Player.GameObjGUID)
            {
                return;
            }
            EnemySelect(info, true);
        }