示例#1
0
文件: Marshaler.cs 项目: hothoty/Zero
 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);
 }
示例#2
0
 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);
 }
示例#3
0
文件: Marshaler.cs 项目: hothoty/Zero
 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]);
     }
 }
示例#4
0
文件: Marshaler.cs 项目: hothoty/Zero
        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]);
            }
        }
示例#5
0
        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]);
            }
        }
示例#6
0
文件: CMain.cs 项目: ypdevman/Zero
    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();
    }
示例#7
0
文件: CMain.cs 项目: mindsteeper/Zero
	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();
	}
示例#8
0
文件: Marshaler.cs 项目: hothoty/Zero
 public static void Write(ZNet.CMessage msg, CUserClass b)
 {
     Write(msg, b.map_test);
     msg.Write(b.str_test);
     msg.Write(b.int_test);
 }
示例#9
0
 public static void Write(ZNet.CMessage msg, CUserClass b)
 {
     Write(msg, b.map_test);
     msg.Write(b.str_test);
     msg.Write(b.int_test);
 }