JSON comments are back!
parent
3609505057
commit
c90fa73fb1
|
@ -6,4 +6,4 @@ edition = "2021"
|
|||
[dependencies]
|
||||
bevy = "0.12.0"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = "1.0"
|
||||
serde_json5 = "0.1.0"
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
{
|
||||
//These values go hard feel free to modify tho
|
||||
"speed":0.3,
|
||||
"movement":[10.0,0.0],
|
||||
//Stay the fuck away from these, please I worked very hard on them :(
|
||||
"direction":[0.0,0.0],
|
||||
"dash":false
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
|
|||
|
||||
let texture = asset_server.load("blobcat_hertog.png");
|
||||
let json_file = fs::read_to_string("./data/player_data.json").expect("Error Reading Player Data");
|
||||
let player_data: Player = serde_json::from_str::<Player>(&json_file).expect("Error serializing to JSON");
|
||||
let player_data: Player = serde_json5::from_str::<Player>(&json_file).expect("Error serializing to JSON");
|
||||
|
||||
commands.spawn((
|
||||
SpriteBundle {
|
||||
|
|
Loading…
Reference in New Issue