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

Fix json loader impl

parent 8dbbafde
No related branches found
No related tags found
No related merge requests found
[package] [package]
name = "micro_games_macros" name = "micro_games_macros"
version = "0.6.0" version = "0.7.0"
edition = "2021" edition = "2021"
authors = ["Louis Capitanchik <contact@louiscap.co>"] authors = ["Louis Capitanchik <contact@louiscap.co>"]
description = "Utility macros to make it easier to build complex systems with Bevy" description = "Utility macros to make it easier to build complex systems with Bevy"
...@@ -21,10 +21,10 @@ test-case = "3.3.1" ...@@ -21,10 +21,10 @@ test-case = "3.3.1"
serde = { version = "1.0", features = ["derive"] } serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0" serde_json = "1.0"
anyhow = "1.0" anyhow = "1.0"
micro_bevy_world_utils = "0.5" micro_bevy_world_utils = "0.6"
[dev-dependencies.bevy] [dev-dependencies.bevy]
version = "0.14" version = "0.15"
default-features = false default-features = false
features = [ features = [
"bevy_asset", "bevy_asset",
......
...@@ -75,20 +75,6 @@ fn example() { ...@@ -75,20 +75,6 @@ fn example() {
} }
``` ```
### Kayak Widget
A simple derive for Kayak UI's "Widget" trait
```rust
use micro_game_macros::Widget;
#[derive(Widget)]
struct MyComponent;
// ... Other Kayak Setup ...
```
### Tag Finder ### Tag Finder
Create a system param for checking whether an entity has one of a specified number of tags. The tag finder will also Create a system param for checking whether an entity has one of a specified number of tags. The tag finder will also
...@@ -104,4 +90,10 @@ pub struct TagFinder { ...@@ -104,4 +90,10 @@ pub struct TagFinder {
#[sparse] #[sparse]
hover: Hover, hover: Hover,
} }
```
### Event System
```rust
``` ```
\ No newline at end of file
...@@ -122,11 +122,11 @@ pub fn define_loader( ...@@ -122,11 +122,11 @@ pub fn define_loader(
type Settings = (); type Settings = ();
type Error = #error_name; type Error = #error_name;
async fn load<'a>( async fn load(
&'a self, &self,
mut reader: &'a mut #BevyAssetReader<'_>, mut reader: &mut dyn #BevyAssetReader,
_settings: &'a Self::Settings, _settings: &Self::Settings,
load_context: &'a mut #BevyLoadContext<'_>, load_context: &mut #BevyLoadContext<'_>,
) -> #FQResult<Self::Asset, Self::Error> { ) -> #FQResult<Self::Asset, Self::Error> {
let mut bytes = #FQVec::new(); let mut bytes = #FQVec::new();
#BevyAsyncRead::read_to_end(&mut reader, &mut bytes).await?; #BevyAsyncRead::read_to_end(&mut reader, &mut bytes).await?;
......
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