コード例 #1
0
ファイル: CNetworkManager.cs プロジェクト: co-chi-tam/CubeWar
        public virtual void OnCreateClient()
        {
            var www = new CWWW();

            www.Get(SERVER_INFO, (result) => {
//				var info = TinyJSON.JSON.Load (result).Make <CServerInfo>();
                this.networkAddress = SERVER_IP;
                this.networkPort    = SERVER_PORT;
                m_CurrentClient     = this.StartClient();
            }, (error) => {
                CLog.Debug("SERVER INFO ERROR: " + error);
            });
        }
コード例 #2
0
        protected override void Start()
        {
            base.Start();
            // Test: Check server version.
            m_ServerRequest = new CWWW();
            m_ServerRequest.Get("https://www.google.com.vn", (result) => {
//				m_ServerRequest.HandleCoroutine (HandleResourceLoader(m_ServerCheckUrl, m_Version, (x) => {
//					this.OnLoadResourceComplete (m_VersionStr, x);
//				}, (e) => {
//					this.OnLoadResourceFail(m_VersionStr, e);
//				}));
                this.OnLoadResourceComplete(m_VersionStr, null);
            }, (error) => {
                this.OnLoadResourceFail(m_VersionStr, error);
            });
        }