Exemplo n.º 1
0
    public int OnNotifyMPInfo(NotifyMPInfo pMsg)
    {
        foreach (GSToGC.NotifyMPInfo.MPInfo info in pMsg.mpinfo)
        {
            UInt64 sGUID = info.guid;
            Player entity;
            if (PlayersManager.Instance.PlayerDic.TryGetValue(sGUID, out entity))
            {
                entity.SetMp((float)info.curmp);
                entity.SetMpMax((float)info.maxmp);

                //更新实体的蓝条
                //playerXueTiao.UpdateMp();
            }
        }
        EventCenter.Broadcast((Int32)GameEventEnum.UserEvent_NotifyMPInfo, pMsg);
        return((Int32)ErrorCodeEnum.Normal);
    }
Exemplo n.º 2
0
 void OnNotifyMPInfo(NotifyMPInfo pMsg)
 {
     Debug.Log("OnNotifyMPInfo");
 }