another week, another OUTSiDE iDle TIMEgit statusgit status console error squelched
This commit is contained in:
parent
e85c09a6a4
commit
57b341f515
1 changed files with 5 additions and 2 deletions
|
@ -24,6 +24,7 @@ func _physics_process(delta):
|
||||||
position.x += speed * direction * delta
|
position.x += speed * direction * delta
|
||||||
#Delete when offscreen
|
#Delete when offscreen
|
||||||
if Game.get_sector(global_position + cull_edge) != initial_sector:
|
if Game.get_sector(global_position + cull_edge) != initial_sector:
|
||||||
|
_persist_trail()
|
||||||
queue_free()
|
queue_free()
|
||||||
|
|
||||||
#Wall Collision
|
#Wall Collision
|
||||||
|
@ -31,6 +32,7 @@ func _on_Hitbox_body_entered(body):
|
||||||
if breaks_on_wall:
|
if breaks_on_wall:
|
||||||
if body is TileMap or body is StaticBody2D:
|
if body is TileMap or body is StaticBody2D:
|
||||||
_make_sparks()
|
_make_sparks()
|
||||||
|
_persist_trail()
|
||||||
queue_free()
|
queue_free()
|
||||||
|
|
||||||
# kill entity if in target group
|
# kill entity if in target group
|
||||||
|
@ -49,13 +51,14 @@ func _on_Hitbox_area_entered(area):
|
||||||
#decrease arrows if enemy killed
|
#decrease arrows if enemy killed
|
||||||
if target_group == "enemy_hitbox":
|
if target_group == "enemy_hitbox":
|
||||||
Game.arrows = max(0, Game.arrows - 1) # clamp arrows above 0
|
Game.arrows = max(0, Game.arrows - 1) # clamp arrows above 0
|
||||||
|
_persist_trail()
|
||||||
queue_free()
|
queue_free()
|
||||||
elif area.is_in_group("arrow"):
|
elif area.is_in_group("arrow"):
|
||||||
_make_sparks()
|
_make_sparks()
|
||||||
|
_persist_trail()
|
||||||
queue_free()
|
queue_free()
|
||||||
|
|
||||||
func _exit_tree():
|
func _persist_trail():
|
||||||
# make sure particles node sticks around until particles decay
|
|
||||||
var particles = $DustParticles
|
var particles = $DustParticles
|
||||||
remove_child(particles)
|
remove_child(particles)
|
||||||
get_parent().add_child(particles)
|
get_parent().add_child(particles)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue