Пример #1
0
    /// <summary>
    /// GUI
    /// </summary>
    void OnGUI()
    {
        if (GUI.Button(new Rect(10, 10, 150, 30), "Connect"))
        {
            Debug.Log("connect");
            ClientSessionManager.GetInstance().Connect(0, "192.168.0.243", 3010);
        }

        if (GUI.Button(new Rect(200, 10, 150, 30), "DisConnect"))
        {
            Debug.Log("disconnect");
            ClientSessionManager.GetInstance().DisConnect(0);
        }
    }
Пример #2
0
 /// <summary>
 /// 销毁
 /// </summary>
 void OnApplicationQuit()
 {
     ClientSessionManager.GetInstance().DisConnect(0);
 }
Пример #3
0
 /// <summary>
 /// 逻辑更新
 /// </summary>
 void FixedUpdate()
 {
     //
     ClientSessionManager.GetInstance().Update();
 }