made rock work with weird parent stuff

This commit is contained in:
pennyrigate 2023-06-13 05:10:49 -04:00
parent c2151b8ea8
commit ace4a53bd5

View file

@ -18,6 +18,6 @@ func push(amount: float):
func _on_Hitbox_area_entered(area): func _on_Hitbox_area_entered(area):
# do not squish if in "blocks_squash" group # do not squish if in "blocks_squash" group
if area.is_in_group("enemy_hitbox") and not area.is_in_group("blocks_squash"): if area.is_in_group("enemy_hitbox") and not area.is_in_group("blocks_squash"):
var enemy = area.get_parent() var enemy = area.get_owner()
if enemy.global_position.y > global_position.y and velocity.y > 0: if enemy.global_position.y > global_position.y and velocity.y > 0:
enemy.die() enemy.die()