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
+4 -4
View File
@@ -11,10 +11,6 @@ const ENEMY_PROJECTILE_LAYER = 16
@export_range(0, 1000) var speed : int = 0
@onready var collision : CollisionShape2D = $CollisionShape2D
@onready var out_of_screen_timer : Timer = $OutOfScreenTimer
var direction : Vector2
var ship_velocity: Vector2
@@ -32,6 +28,10 @@ var collide_enemies: bool:
var _velocity: Vector2
@onready var collision : CollisionShape2D = $CollisionShape2D
@onready var out_of_screen_timer : Timer = $OutOfScreenTimer
func _ready() -> void:
_velocity = direction.normalized() * speed + ship_velocity
_update_collision_rotation(_velocity)