Skip to content
Snippets Groups Projects
Verified Commit 3c4173f9 authored by Louis's avatar Louis :fire:
Browse files

Use get_all_levels for multi-world support

parent fd860a4d
No related branches found
No related tags found
No related merge requests found
...@@ -2077,7 +2077,7 @@ dependencies = [ ...@@ -2077,7 +2077,7 @@ dependencies = [
[[package]] [[package]]
name = "micro_ldtk" name = "micro_ldtk"
version = "0.3.0" version = "0.4.0"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"bevy", "bevy",
......
...@@ -17,7 +17,7 @@ select the schema version you need: ...@@ -17,7 +17,7 @@ select the schema version you need:
```toml ```toml
[dependencies] [dependencies]
micro_ldtk = { version = "0.3.0-beta.1", default-features = false, features = ["ldtk_1_2_5", "autotile"] } micro_ldtk = { version = "0.4.1", default-features = false, features = ["ldtk_1_3_0", "autotile"] }
``` ```
### Features ### Features
......
...@@ -17,7 +17,7 @@ pub fn handle_ldtk_project_events( ...@@ -17,7 +17,7 @@ pub fn handle_ldtk_project_events(
match event { match event {
AssetEvent::Created { handle } | AssetEvent::Modified { handle } => { AssetEvent::Created { handle } | AssetEvent::Modified { handle } => {
if let Some(project) = assets.get(handle) { if let Some(project) = assets.get(handle) {
for level in &project.levels { for level in project.get_all_levels() {
level_index level_index
.insert(level.identifier.clone(), LdtkLevel::from(level.clone())); .insert(level.identifier.clone(), LdtkLevel::from(level.clone()));
update_events.send(LevelDataUpdated(level.identifier.clone())); update_events.send(LevelDataUpdated(level.identifier.clone()));
......
#[cfg(any(
feature = "ldtk_1_3_0",
feature = "ldtk_1_2_5",
feature = "ldtk_1_2_4",
feature = "ldtk_1_2_3",
feature = "ldtk_1_2_2",
feature = "ldtk_1_2_1",
feature = "ldtk_1_2_0",
feature = "ldtk_1_1_3",
feature = "ldtk_1_1_2",
feature = "ldtk_1_1_1",
feature = "ldtk_1_1_0",
feature = "ldtk_1_0_0",
))]
mod assets; mod assets;
mod camera; mod camera;
mod map_query; mod map_query;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment