Skip to content

Commit

Permalink
docs: Fix IsometricTileMap code
Browse files Browse the repository at this point in the history
Fix the code in the docs page examples which has IsometricTileset and is
not present in the flame to SpriteSheet
  • Loading branch information
immadisairaj committed May 18, 2024
1 parent 6d7eeee commit eae398a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/flame/components.md
Original file line number Diff line number Diff line change
Expand Up @@ -1231,7 +1231,7 @@ A simple example on how to use it:
// Creates a tileset, the block ids are automatically assigned sequentially
// starting at 0, from left to right and then top to bottom.
final tilesetImage = await images.load('tileset.png');
final tileset = IsometricTileset(tilesetImage, 32);
final tileset = SpriteSheet(image: tilesetImage, srcSize: Vector2.all(32));
// Each element is a block id, -1 means nothing
final matrix = [[0, 1, 0], [1, 0, 0], [1, 1, 1]];
add(IsometricTileMapComponent(tileset, matrix));
Expand Down

0 comments on commit eae398a

Please sign in to comment.