Added pickups and doors

This commit is contained in:
2026-01-07 17:33:42 +03:00
parent 33bbac64a1
commit 33cbfeebb9
40 changed files with 732 additions and 5 deletions
+18
View File
@@ -0,0 +1,18 @@
class_name ClosedDoor
extends Door
func _is_key(_node: Node) -> bool:
return false
func _can_open(body: Node2D) -> bool:
if not body.has_node("Pickups"): return false
if not body.has_method("remove_pickup"): return false
for pickup in body.get_node("Pickups").get_children():
if _is_key(pickup):
body.remove_pickup(pickup)
return true
return false