use bevy::prelude::*; #[derive(Component, Reflect, Default, Debug)] #[reflect(Component)] struct UnitTest; #[derive(Component, Reflect, Default, Debug, Deref, DerefMut)] #[reflect(Component)] struct TupleTestF32(f32); #[derive(Component, Reflect, Default, Debug, Deref, DerefMut)] #[reflect(Component)] struct TupleTestU64(u64); #[derive(Component, Reflect, Default, Debug, Deref, DerefMut)] #[reflect(Component)] pub struct TupleTestStr(String); #[derive(Component, Reflect, Default, Debug)] #[reflect(Component)] struct TupleTest2(f32, u64, String); #[derive(Component, Reflect, Default, Debug)] #[reflect(Component)] struct TupleTestBool(bool); #[derive(Component, Reflect, Default, Debug)] #[reflect(Component)] struct TupleVec2(Vec2); #[derive(Component, Reflect, Default, Debug)] #[reflect(Component)] struct TupleVec3(Vec3); #[derive(Component, Reflect, Default, Debug)] #[reflect(Component)] struct TupleVec(Vec); #[derive(Component, Reflect, Default, Debug)] #[reflect(Component)] struct TupleTestColor(Color); #[derive(Component, Reflect, Default, Debug)] #[reflect(Component)] struct BasicTest { a: f32, b: u64, c: String, } #[derive(Component, Reflect, Default, Debug)] #[reflect(Component)] pub enum EnumTest { Metal, Wood, Rock, Cloth, Squishy, #[default] None, } pub struct ComponentsExamplesPlugin; impl Plugin for ComponentsExamplesPlugin { fn build(&self, app: &mut App) { app.register_type::() .register_type::() .register_type::() .register_type::() .register_type::() .register_type::() .register_type::() .register_type::() .register_type::() .register_type::() .register_type::() .register_type::() .register_type::>(); } }