Some code style fixes. Fixed enemy spawning
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user