Exemplo n.º 1
0
    public void MoveBaixo()
    {
        transform.position += new Vector3(0, -1, 0);

        if (PosicaoValida())
        {
            gameManager.atualizaGrade(this);
        }
        else
        {
            transform.position += new Vector3(0, 1, 0);

            // Apaga a linha se ela estiver cheia
            gameManager.ApagaLinha();

            if (gameManager.AcimaGrade(this))
            {
                gameManager.GameOver();
            }

            gameManager.AcimaGrade(this);



            this.enabled = false;
            spawnTetro.ProximaPeca();
        }
    }