Platform material & filter bundle
This commit is contained in:
parent
12e58b3fc0
commit
297811e882
6 changed files with 93 additions and 21 deletions
20
src/filters.rs
Normal file
20
src/filters.rs
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
use bevy::prelude::*;
|
||||
use bevy_rapier2d::prelude::*;
|
||||
|
||||
#[derive(Component, Default)]
|
||||
pub struct FilterColor(pub Color);
|
||||
|
||||
#[derive(Component)]
|
||||
pub enum PassThroughFilter {
|
||||
Absorbing,
|
||||
}
|
||||
|
||||
#[derive(Bundle)]
|
||||
pub struct AbsorbingFilter {
|
||||
pub color: FilterColor,
|
||||
#[bundle]
|
||||
pub mesh: ColorMesh2dBundle,
|
||||
pub collider: Collider,
|
||||
pub sensor: Sensor,
|
||||
pub filter_type: PassThroughFilter,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue