/// <summary> /// /// </summary> /// <param name="binaryReader"></param> public void OnMessageEvent(BinaryReader binaryReader) { var shaderKunPacket = new ShaderKunPacket(); shaderKunPacket.Deserialize(binaryReader); shaderKuns = shaderKunPacket.shaderKuns; shaderNames = new string[shaderKuns.Length]; for (var i = 0; i < shaderKuns.Length; i++) { shaderNames[i] = shaderKuns[i].name; } }
/// <summary> /// /// </summary> /// <param name="bytes"></param> public void OnMessageEventPull(BinaryReader binaryReader) { GetAllShader(); var shaderKuns = new ShaderKun[shaderDict.Count]; var i = 0; foreach (var shader in shaderDict.Values) { shaderKuns[i] = new ShaderKun(shader); i++; } var shaderKunPacket = new ShaderKunPacket(); shaderKunPacket.shaderKuns = shaderKuns; UnityChoseKunPlayer.SendMessage <ShaderKunPacket>(UnityChoseKun.MessageID.ShaderPull, shaderKunPacket); }