Some code style fixes. Fixed enemy spawning

This commit is contained in:
2025-12-07 23:51:00 +03:00
parent c594f561a5
commit a19a5eeb80
23 changed files with 100 additions and 98 deletions
+5 -5
View File
@@ -6,12 +6,12 @@ signal accelerate(direction: Vector2, delta: float)
signal shoot()
@export var ship: AbstractEnemyShip
const FREE_FLIGHT_DIST = 50
@export var ship: AbstractEnemyShip
var target_position : Vector2
var direction : Vector2
@@ -23,10 +23,10 @@ func _physics_process(delta: float) -> void:
func _on_direction_timer_timeout() -> void:
direction = get_acceleration_direction()
direction = _get_acceleration_direction()
func get_acceleration_direction() -> Vector2:
func _get_acceleration_direction() -> Vector2:
var distance := ship.position.distance_to(target_position)
if distance < FREE_FLIGHT_DIST: