Damage rebalanced

This commit is contained in:
Rendo 2025-11-16 17:59:10 +05:00
commit 1aa45b2d57
3 changed files with 11 additions and 5 deletions

View file

@ -1,6 +1,11 @@
use bevy::prelude::*;
use crate::{collision::Collider, damagable::Damagable, ships::Factions, velocity::Velocity};
use crate::{
collision::Collider,
damagable::Damagable,
ships::{Factions, gun::Gun},
velocity::Velocity,
};
#[derive(Component)]
pub struct Enemy;
@ -8,11 +13,12 @@ pub struct Enemy;
pub fn spawn_enemy(commands: &mut Commands, sprite: Handle<Image>, at: Vec2) {
commands.spawn((
Enemy,
Gun::new(5, f32::to_radians(15.), 0.2),
Collider::new(8.),
Velocity::stopped(500., f32::to_radians(360.)),
Sprite::from(sprite),
Transform::from_xyz(at.x, at.y, 0.),
Damagable::new(10),
Damagable::new(100),
Factions::EnemyFaction,
));
}