IEnumerator Start() { if (!onlineMode) { using (WWW www = new WWW(url)) { yield return(www); dataAsJson = www.text; } //yield return GetWWWJson(); Debug.Log("get dataAsJson Over" + dataAsJson); } if (players.Count == 0) { PlayerInfo player = new PlayerInfo("本地主机", PlayerType.LOCAL); players.Add(player); players.Add(new PlayerInfo("电脑人", PlayerType.AI)); players.Add(new PlayerInfo("恶魔人", PlayerType.AI)); } GenerateChessBoards(players); InitShop(); if (!onlineMode) { LocalInitEveryShop(); } LocalPlayerController localPlayerCtrl = this.gameObject.GetComponent <LocalPlayerController> (); GameFlowController flowCtrl = GetComponent <GameFlowController> (); localPlayerCtrl.DataReady(this); flowCtrl.DataReady(this); Debug.Log("Data Controller Start over"); }