Add reflection & debug inspector stuff to Score
This commit is contained in:
@@ -46,6 +46,7 @@ impl Plugin for AsteroidPlugin {
|
||||
.insert_resource(Lives(3))
|
||||
.register_type::<Lives>()
|
||||
.insert_resource(Score(0))
|
||||
.register_type::<Score>()
|
||||
.insert_resource(AsteroidSpawner::new())
|
||||
.init_resource::<GameAssets>()
|
||||
.add_systems(Startup, spawn_camera)
|
||||
|
||||
@@ -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<Score> for String {
|
||||
|
||||
Reference in New Issue
Block a user