Damage rebalanced
This commit is contained in:
parent
9c774fdccf
commit
1aa45b2d57
3 changed files with 11 additions and 5 deletions
|
|
@ -51,7 +51,7 @@ pub fn setup_asteroids(mut commands: Commands, asset_server: Res<AssetServer>) {
|
|||
Sprite::from(sprite),
|
||||
Transform::from_translation(position),
|
||||
Collider::new(8.),
|
||||
Damagable::new(20),
|
||||
Damagable::new(200),
|
||||
))
|
||||
.observe(bump);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,12 +23,12 @@ pub fn spawn_player(commands: &mut Commands, sprite: Handle<Image>, at: Vec2) {
|
|||
deceleration: 300.,
|
||||
stop_epsilon: 50.,
|
||||
},
|
||||
Gun::new(1, f32::to_radians(15.), 0.2),
|
||||
Gun::new(20, f32::to_radians(7.), 0.2),
|
||||
Collider::new(8.),
|
||||
Sprite::from(sprite),
|
||||
Transform::from_xyz(at.x, at.y, 0.),
|
||||
Factions::PlayerFaction,
|
||||
Damagable::new(15),
|
||||
Damagable::new(150),
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue