You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was just casually going through the component to try it out for the first time. Then I stumbled upon this below screenshot.
Where there is IsometricTileset where I am confused as I don't see that method or class anywhere.
Until I saw the example code, I didn't know how to proceed further. Maybe this minimal example code could be updated to show proper working code. This kind of things might be there for other components as well? (not sure). But, as I came across this one, found it to be a problem.
Why should this be improved
When trying out something with new components, the first place would be docs and when this kind of issue comes, people might back out or have to go into example to look why they are facing the error.
final tileset = IsometricTileset(tilesetImage, 32);
Proposed solution:
Changing it to SpriteSheet?
// 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 =SpriteSheet(image: tilesetImage, srcSize:Vector2.all(32));
// Each element is a block id, -1 means nothingfinal matrix = [[0, 1, 0], [1, 0, 0], [1, 1, 1]];
add(IsometricTileMapComponent(tileset, matrix));
Other
Are you interested in working on a PR for this?
The text was updated successfully, but these errors were encountered:
What could be improved
I was just casually going through the component to try it out for the first time. Then I stumbled upon this below screenshot.
Where there is
IsometricTileset
where I am confused as I don't see that method or class anywhere.Until I saw the example code, I didn't know how to proceed further. Maybe this minimal example code could be updated to show proper working code. This kind of things might be there for other components as well? (not sure). But, as I came across this one, found it to be a problem.
Why should this be improved
When trying out something with new components, the first place would be docs and when this kind of issue comes, people might back out or have to go into example to look why they are facing the error.
Risks
No response
More information
Line in code:
flame/doc/flame/components.md
Line 1234 in 6d7eeee
Proposed solution:
Changing it to
SpriteSheet
?Other
The text was updated successfully, but these errors were encountered: