-
Notifications
You must be signed in to change notification settings - Fork 8
Upgrade to bevy 0.7 #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@@ -44,7 +44,7 @@ pub(crate) struct SpriteData<T> { | |||
} | |||
impl SpriteData<Image> { | |||
pub(crate) fn new(ase: &AsepriteFile, frame: u32) -> Self { | |||
let img = ase.frame(frame).image(); | |||
let img = &ase.frame(frame).image(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know why I did this, I'll look into that
@@ -77,16 +77,16 @@ fn spawn_tiles( | |||
) { | |||
for (_, tileset) in tilesets.iter() { | |||
let texture_handle = tileset.texture.clone(); | |||
let material_handle = materials.add(ColorMaterial::texture(texture_handle)); | |||
//let material_handle = materials.add(ColorMaterial::from(texture_handle)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't mean to leave these comments in.
|
||
let (mut layer_builder, layer_entity) = | ||
LayerBuilder::<TileBundle>::new(&mut commands, settings, 0u16, 0u16); | ||
|
||
set_tiles(&mut layer_builder); | ||
|
||
map_query.build_layer(&mut commands, layer_builder, material_handle); | ||
map_query.build_layer(&mut commands, layer_builder, texture_handle); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed these because build_layer doesn't accept ColorMaterial. I made this change quickly without understanding what the example is trying to do, I'll fix it soon
This isn't finished yet because for some reason the tilemap example doesn't work, it just shows a gray screen.
This message from bevy_ecs_tilemap gets printed over and over:
I haven't looked into why this happens yet.