public static void Read(ZNet.CMessage msg, out CUserClass b) { b = new CUserClass(); Read(msg, out b.map_test); msg.Read(out b.str_test); msg.Read(out b.int_test); }
public static void Write(ZNet.CMessage msg, CUserClass[] b) { Int32 data = b.Count(); Write(msg, data); for (Int32 i = 0; i < data; i++) { Write(msg, b[i]); } }
public static void Read(ZNet.CMessage msg, out CUserClass[] b) { Int32 data; Read(msg, out data); b = new CUserClass[data]; for (Int32 i = 0; i < data; i++) { Read(msg, out b[i]); } }
void OnGUI() { // Received text. GUILayout.BeginVertical(); currentScrollPos = GUILayout.BeginScrollView(currentScrollPos, GUILayout.MaxWidth(Screen.width), GUILayout.MinWidth(Screen.width), GUILayout.MaxHeight(Screen.height - 100), GUILayout.MinHeight(Screen.height - 100)); foreach (string text in this.received_texts) { GUILayout.BeginHorizontal(); GUI.skin.label.wordWrap = true; GUILayout.Label(text); GUILayout.EndHorizontal(); } GUILayout.EndScrollView(); GUILayout.EndVertical(); // Input. GUILayout.BeginHorizontal(); this.input_text = GUILayout.TextField(this.input_text, GUILayout.MaxWidth(Screen.width - 100), GUILayout.MinWidth(Screen.width - 100), GUILayout.MaxHeight(50), GUILayout.MinHeight(50)); if (GUILayout.Button("Send", GUILayout.MaxWidth(100), GUILayout.MinWidth(100), GUILayout.MaxHeight(50), GUILayout.MinHeight(50))) { // 패킷 송신 테스트 RemoteClass.CUserClass testClass = new RemoteClass.CUserClass(); Dictionary <int, int> testDic = new Dictionary <int, int>(); testDic.Add(1212345, 1230); proxy.request_Echo(RemoteID.Remote_Server, new CPackOption(PacketMode8.PM_None), testClass, testDic, this.input_text); this.input_text = ""; } GUILayout.EndHorizontal(); }
void OnGUI() { // Received text. GUILayout.BeginVertical(); currentScrollPos = GUILayout.BeginScrollView(currentScrollPos, GUILayout.MaxWidth(Screen.width), GUILayout.MinWidth(Screen.width), GUILayout.MaxHeight(Screen.height - 100), GUILayout.MinHeight(Screen.height - 100)); foreach (string text in this.received_texts) { GUILayout.BeginHorizontal(); GUI.skin.label.wordWrap = true; GUILayout.Label(text); GUILayout.EndHorizontal(); } GUILayout.EndScrollView(); GUILayout.EndVertical(); // Input. GUILayout.BeginHorizontal(); this.input_text = GUILayout.TextField(this.input_text, GUILayout.MaxWidth(Screen.width - 100), GUILayout.MinWidth(Screen.width - 100), GUILayout.MaxHeight(50), GUILayout.MinHeight(50)); if (GUILayout.Button("Send", GUILayout.MaxWidth(100), GUILayout.MinWidth(100), GUILayout.MaxHeight(50), GUILayout.MinHeight(50))) { // 패킷 송신 테스트 RemoteClass.CUserClass testClass = new RemoteClass.CUserClass(); Dictionary<int,int> testDic = new Dictionary<int,int>(); testDic.Add(1212345, 1230); proxy.request_Echo(RemoteID.Remote_Server, new CPackOption(PacketMode8.PM_None), testClass, testDic, this.input_text); this.input_text = ""; } GUILayout.EndHorizontal(); }
public static void Write(ZNet.CMessage msg, CUserClass b) { Write(msg, b.map_test); msg.Write(b.str_test); msg.Write(b.int_test); }