Public
This commit is contained in:
parent
7099b8629d
commit
feb72f9d32
2 changed files with 4 additions and 4 deletions
|
|
@ -9,12 +9,12 @@ impl Plugin for CollisionPlugin {
|
|||
}
|
||||
|
||||
#[derive(Component)]
|
||||
pub struct Collider(f32);
|
||||
pub struct Collider(pub f32);
|
||||
|
||||
#[derive(EntityEvent)]
|
||||
pub struct Collided {
|
||||
entity: Entity,
|
||||
with: Entity,
|
||||
pub entity: Entity,
|
||||
pub with: Entity,
|
||||
}
|
||||
|
||||
fn calculate_collisions(mut commands: Commands, query: Query<(Entity, &Transform, &Collider)>) {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use bevy::prelude::*;
|
||||
|
||||
use crate::collision::CollisionPlugin;
|
||||
use crate::collision::{Collided, Collider, CollisionPlugin};
|
||||
use crate::damagable::DamagablePlugin;
|
||||
|
||||
mod collision;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue