Add conversion methods.
This commit is contained in:
parent
7087e47e6a
commit
701cac5568
12
src/map.rs
12
src/map.rs
|
@ -40,6 +40,12 @@ pub struct Portal;
|
|||
#[reflect(Component)]
|
||||
pub struct SpawnColliderPerTile(pub bool);
|
||||
|
||||
impl From<bool> for SpawnColliderPerTile {
|
||||
fn from(v: bool) -> Self {
|
||||
Self(v)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Component, Clone, Debug, Deref, DerefMut, Reflect)]
|
||||
#[reflect(Component)]
|
||||
pub struct SpawnColliders(pub bool);
|
||||
|
@ -50,6 +56,12 @@ impl Default for SpawnColliders {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<bool> for SpawnColliders {
|
||||
fn from(v: bool) -> Self {
|
||||
Self(v)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Component, Clone, Debug, Deref, DerefMut, Reflect)]
|
||||
#[reflect(Component)]
|
||||
pub struct SpawnPortals(pub bool);
|
||||
|
|
Loading…
Reference in New Issue
Block a user