Esempio n. 1
0
    void Awake()
    {
        if (m_netManager != null)
        {
            Destroy(this.gameObject);
        }

        m_netManager = this;
        DontDestroyOnLoad(this.gameObject);

        //项目只能唯一一个地方使用RegisterLogCallback
        //Application.RegisterLogCallback(LogModule.Log);
        NetWorkLogic.SetConnectLostDelegate(ConnectLost);
        m_instance = this;
    }
Esempio n. 2
0
 public void OnInit()
 {
     NetWorkLogic.SetConnectLostDelegate(ConnectLost);
 }