Isometric rendering

This commit is contained in:
Luan Nico
2020-09-06 14:05:03 -04:00
parent 7b8b489d6e
commit fd9d69e7d5
2 changed files with 25 additions and 5 deletions

View File

@ -17,9 +17,17 @@ class MyGame extends BaseGame {
void init() async {
final tileset = await IsometricTileset.load('tiles.png', 32);
final matrix = [
[-1, 1, 0, 0],
[1, 1, 0, 2],
[-1, 1, 1, 1, 0, 0],
[-1, 1, 2, 1, 0, 0],
[-1, 0, 1, 1, 0, 0],
[-1, 1, 1, 1, 0, 0],
[1, 1, 1, 1, 0, 2],
[1, 3, 3, 3, 0, 2],
];
add(IsometricTileMapComponent(tileset, matrix));
add(
IsometricTileMapComponent(tileset, matrix)
..x = 100
..y = 100,
);
}
}