Exemplo n.º 1
0
    private void OnMouseDown()
    {
        playerTurn = gameController.Turn;
        win.buttonActive(false);

        if (playerTurn == 1)
        {
            spr.sprite = x;
            choice     = "x";
        }
        else if (playerTurn == 0)
        {
            spr.sprite = o;
            choice     = "o";
        }
        BoxCollider2D col = GetComponent <BoxCollider2D>();

        col.enabled = !col.enabled;
        gameController.ChangeTurn();
        win.Obj();
        win.wining();
        aiScript.aiInGame();
    }
Exemplo n.º 2
0
 public void EnableAI()
 {
     playerAI = true;
     win.buttonActive(false);
 }