mirror of https://github.com/profan/ld-39-jam.git
logical death, not death of object
This commit is contained in:
parent
53abec8107
commit
4ec4375b66
|
@ -41,7 +41,6 @@ func _ready():
|
||||||
s_arrive.set_target(player)
|
s_arrive.set_target(player)
|
||||||
|
|
||||||
player.on_enemy_missile_lock(self)
|
player.on_enemy_missile_lock(self)
|
||||||
connect("exit_tree", player, "on_enemy_missile_lock_lost", [self])
|
|
||||||
|
|
||||||
# base death timer on lifetime
|
# base death timer on lifetime
|
||||||
death_time = ps.get_lifetime()
|
death_time = ps.get_lifetime()
|
||||||
|
@ -76,6 +75,7 @@ func queue_death():
|
||||||
sprite.hide()
|
sprite.hide()
|
||||||
ps.set_emitting(false)
|
ps.set_emitting(false)
|
||||||
cs.queue_free() # kill it
|
cs.queue_free() # kill it
|
||||||
|
get_tree().get_root().get_node("Game/Player").on_enemy_missile_lock_lost(self)
|
||||||
is_dead = true
|
is_dead = true
|
||||||
|
|
||||||
func _fixed_process(delta):
|
func _fixed_process(delta):
|
||||||
|
|
|
@ -47,7 +47,7 @@ func on_enemy_missile_lock_lost(m):
|
||||||
enemy_missiles.erase(m)
|
enemy_missiles.erase(m)
|
||||||
missiles_locked_on -= 1
|
missiles_locked_on -= 1
|
||||||
if missiles_locked_on <= 0:
|
if missiles_locked_on <= 0:
|
||||||
audio.stop_all()
|
pass
|
||||||
|
|
||||||
func turn_towards(delta, pos):
|
func turn_towards(delta, pos):
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue