void OnEnable() { var levelStateChangePackage = new LevelStateChangedPackage(udpBoxContainer.PackageHeadBytes); levelStateChangePackage.StateID = newStateID; levelStateChangePackage.ArgInfo = argInfo; var bytes = levelStateChangePackage.Serialize(); foreach (var clientInfo in udpBoxContainer.ClientIPConnectInfoList) { udpBoxContainer.SendUDPMessage(bytes, clientInfo.IPEndPoint); } }
public LevelStateChangedHandler(byte[] packageHead) { mTemplate = new LevelStateChangedPackage(packageHead); }