Exemple #1
0
    public void Move(InputDirection id)
    {
        switch (id)
        {
        case InputDirection.Down:
            tilesManager.MoveDown();
            break;

        case InputDirection.Left:
            tilesManager.MoveLeft();
            break;

        case InputDirection.Right:
            tilesManager.MoveRight();
            break;

        case InputDirection.Up:
            tilesManager.MoveUp();
            break;

        default:
            Debug.LogError("Invalid input direction: " + id.ToString());
            break;
        }

        tilesManager.ResetThisTurnFlags();

        CheckGameOver();
    }