Projectile damage
This commit is contained in:
parent
f56ae2bc04
commit
4bf62bfe39
6 changed files with 71 additions and 2 deletions
|
|
@ -1,6 +1,6 @@
|
|||
use bevy::prelude::*;
|
||||
|
||||
use crate::{collision::Collider, movable::Movable};
|
||||
use crate::{collision::Collider, damagable::Damagable, movable::Movable};
|
||||
|
||||
#[derive(Component)]
|
||||
pub struct Enemy;
|
||||
|
|
@ -12,5 +12,6 @@ pub fn spawn_enemy(commands: &mut Commands, sprite: Handle<Image>, at: Vec2) {
|
|||
Movable::new(500., f32::to_radians(360.)),
|
||||
Sprite::from(sprite),
|
||||
Transform::from_xyz(at.x, at.y, 0.),
|
||||
Damagable::new(10),
|
||||
));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue