Better enemy attack rate

This commit is contained in:
Joshua Barretto 2019-08-03 19:28:26 +01:00
parent 91b8b69186
commit 5fc6ab2126

View File

@ -74,7 +74,7 @@ impl<'a> System<'a> for Sys {
controller.move_dir =
Vec2::<f32>::from(target_pos.0 - pos.0).normalized() * 0.5;
if rand::random::<f32>() < 0.1 {
if rand::random::<f32>() < 0.05 {
controller.attack = true;
} else {
controller.attack = false;