void Start()
 {
     // Start the server manually...
     // if you want to change the server starting point,
     // move this method to another function.
     NetManager.SetupServer( );
 }
Exemple #2
0
    /// <summary>
    /// 游戏作为服务器启动
    /// </summary>
    public void StartAsServer()
    {
        // 网络启动
        netManager.SetupServer();

        team  = Team.red;
        Round = Team.red;
        // InitChessColor(team);

        // 设置游戏当前状态
        selfStage = GameStage.Connected;
        // 设置提示文本内容
        gameUI.SetExplainText("等待服务器连接中...");
    }