Example #1
0
    public void MoveTile(int x, int y, int deltax, int deltay, TileScript tile)
    {
        moves++;
        gameMenuScript.UpdateMovesText(moves);
        GameObject activeTile = tileManagerScript.GetTile(x, y);

        tileManagerScript.UpdateIndexes(x, y, deltax, deltay);
        StartCoroutine(tile.Move(tileManagerScript.CalculatePosition(tile.XIndex + deltax, tile.YIndex + deltay, activeTile.transform.position.y),
                                 SPEED, deltax, deltay));
    }