diff --git a/src/lib.rs b/src/lib.rs index 3d41ab5..c477ae4 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -46,6 +46,7 @@ impl Plugin for AsteroidPlugin { .insert_resource(Lives(3)) .register_type::() .insert_resource(Score(0)) + .register_type::() .insert_resource(AsteroidSpawner::new()) .init_resource::() .add_systems(Startup, spawn_camera) diff --git a/src/resources.rs b/src/resources.rs index a3001e6..b5fdb03 100644 --- a/src/resources.rs +++ b/src/resources.rs @@ -22,7 +22,8 @@ use crate::{ SHIP_THRUSTER_COLOR_INACTIVE, config::WINDOW_SIZE, }; -#[derive(Resource, Debug, Deref, Clone, Copy)] +#[derive(InspectorOptions, Reflect, Resource, Debug, Deref, Clone, Copy)] +#[reflect(Resource, InspectorOptions)] pub struct Score(pub i32); impl From for String {