using System; using System.Collections; using System.Collections.Generic; using AX.Network.Protocols; using UnityEngine; using AX.Serialization; /// /// 水源信息同步 /// public class WATER_SOURCE_INFO_SYNC : NetworkMessageBehaviour { protected override void Execute(BinaryMessage message) { InputHistory.Instance.RegisterInputHistory(message); var info = message.Body.Deserialize(); // var sender = info.SendUserID; if (InputManager.Instance) { if (CurrentUserInfo.mySelf.Id != info.SenderId) { if (info.GameobjId == GetComponent().gameObjID) { // GetComponent().hasover = info.hasover; GetComponent().totalFlow = info.TotalFlow; GetComponent().AllUserWater = info.AllUserWater; GetComponent().AllUserFoam = info.AllUserFoam; if (GetComponent()) { if (info.AllUserWater > GetComponent().TotalWater) { GetComponent().AllUserWater = GetComponent().TotalWater; } } } } } } }