Exemplo n.º 1
0
    public void StartNewGame()
    {
        StopAllCoroutines();
        var camera = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <MainGameCamera> ();

        camera.Disable();
        if (_boards != null)
        {
            DestroyBoards();
            DestroyPieces();
        }
        _boards     = new Board[3];
        _gameEngine = new GameEngine(_boards);
        State       = GameManagerState.PLAYING;
        Logger      = new Logger();
        CreateBoards();
        InitBoards();
        _overlayManager.ClearLogs();
        _overlayManager.SetLabel(Texts.GetString("WhiteTurnText"), UnityEngine.Color.white);
        _players[0].Init(Color.WHITE, _boards, this);
        _players[1].Init(Color.BLACK, _boards, this);

        //StartCoroutine (Play());
        Play();
    }