//--------------------------------------------------------  
 | 
//    [Author]:           第二世界  
 | 
//    [  Date ]:           Friday, December 28, 2018  
 | 
//--------------------------------------------------------  
 | 
using System;  
 | 
using System.Collections.Generic;  
 | 
  
 | 
using vnxbqy.UI;  
 | 
  
 | 
namespace vnxbqy.UI  
 | 
{  
 | 
      
 | 
  
 | 
    //对手信息  
 | 
    public class OpponentInformation : Singleton<OpponentInformation>  
 | 
    {  
 | 
        public int PlayerID { get; private set; }     // 玩家ID  
 | 
        public int ExAttr4 { get; private set; }    // 当前护盾值  
 | 
  
 | 
        public event Action<int, int> ShieldUpdate;//玩家ID和护盾刷新  
 | 
  
 | 
        public void GetOpponentInformation0418(H0418_tagObjInfoRefresh info)  
 | 
        {  
 | 
  
 | 
            switch ((PlayerDataType)info.RefreshType)  
 | 
            {  
 | 
                case PlayerDataType.ExAttr4:  
 | 
                    this.PlayerID = (int)info.ObjID;  
 | 
                    this.ExAttr4 = (int)info.Value;  
 | 
                    if (ShieldUpdate != null)  
 | 
                    {  
 | 
                        ShieldUpdate((int)info.ObjID, (int)info.Value);  
 | 
                    }  
 | 
                    break;  
 | 
                default:  
 | 
                    break;  
 | 
            }  
 | 
        }  
 | 
        public void GetOpponentInformation0434(H0434_tagAreaPlayerAppearEx info)  
 | 
        {  
 | 
            this.PlayerID = (int)info.PlayerID;  
 | 
            this.ExAttr4 = (int)info.ExAttr4;  
 | 
            if (ShieldUpdate != null)  
 | 
            {  
 | 
                ShieldUpdate((int)info.PlayerID, (int)info.ExAttr4);  
 | 
            }  
 | 
        }  
 | 
    }  
 | 
  
 | 
}  
 | 
  
 | 
  
 | 
  
 |