Enemies now stay on screen after player dies, until start of new game.
This commit is contained in:
parent
ec7a84c252
commit
a20e496c2e
4 changed files with 17 additions and 3 deletions
6
enemy.gd
6
enemy.gd
|
|
@ -8,6 +8,9 @@ var exploding = false
|
|||
|
||||
@onready var screensize = get_viewport_rect().size
|
||||
|
||||
func _ready() -> void:
|
||||
EventBus.enemy_win.connect(_on_enemy_win)
|
||||
|
||||
func start(pos):
|
||||
speed = 0
|
||||
position = Vector2(pos.x, -pos.y)
|
||||
|
|
@ -21,6 +24,9 @@ func start(pos):
|
|||
$ShootTimer.wait_time = randf_range(4, 20)
|
||||
$ShootTimer.start()
|
||||
|
||||
func _on_enemy_win() -> void:
|
||||
print("Enemy win!")
|
||||
|
||||
func _on_timer_timeout() -> void:
|
||||
speed = randf_range(75, 100)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue