add new waves for real
All checks were successful
CI / build (push) Successful in 1m45s

This commit is contained in:
Ultrablob 2025-02-06 14:49:13 -05:00
parent 90256944ab
commit 42e6881453
12 changed files with 80 additions and 19 deletions

21
shield.gd Normal file
View file

@ -0,0 +1,21 @@
extends PhysicsBody2D
#! egregious code
func find_collisionshape():
if get_parent().name == "ShieldMarker":
return get_parent().get_parent().get_node("CollisionShape2D")
elif get_parent().has_node("CollisionShape2D"):
return get_parent().get_node("CollisionShape2D")
return null
func _ready() -> void:
if find_collisionshape():
print(find_collisionshape().get_parent().name)
find_collisionshape().set_deferred("disabled", true)
$Collider.set_deferred("disabled", false)
func destroy():
if find_collisionshape():
find_collisionshape().set_deferred("disabled", false)
$AnimatedSprite2D.play("die")