12 lines
476 B
GDScript
12 lines
476 B
GDScript
extends Area
|
|
|
|
|
|
func _physics_process(delta):
|
|
for body in get_overlapping_bodies():
|
|
if get_overlapping_bodies().has(get_parent().get_node("PlayerTank")):
|
|
print("Hammer")
|
|
self.queue_free()
|
|
if Global.playerhealthbarscale < 2:
|
|
Global.playerhealthbarscale = Global.playerhealthbarscale + 0.25
|
|
Global.bulletdamage = 0 # Makes sure the player won't take damage
|
|
Global.playerhit = 1 # This is just to make the player script notice the change to the health bar
|