Added enemy movement

This commit is contained in:
2025-11-24 23:30:57 +03:00
parent fb6b00be7c
commit b4529a407b
10 changed files with 71 additions and 25 deletions
-6
View File
@@ -75,12 +75,6 @@ func accelerate(direction: Vector2, delta: float) -> void:
velocity = velocity.normalized() * max_speed
func shoot(weapon_index: int) -> void:
if weapon_index >= _weapons.size(): return
_weapons[weapon_index].shoot(velocity)
func _get_new_speed(accel: float, decel: float, current_speed: float) -> float:
if is_zero_approx(accel):
if absf(current_speed) < decel: