feat: implement Tekton NPC with movement, combat, and interaction mechanics, and add initial portal system components.

This commit is contained in:
2026-02-27 04:29:02 +08:00
parent 38a7c06311
commit 1c5c3d47f6
3 changed files with 77 additions and 10 deletions
+7
View File
@@ -33,6 +33,13 @@ func _on_body_entered(body: Node3D):
if not is_active: return
if body.is_in_group("Players") or body.get("is_bot"):
var current_time = Time.get_ticks_msec()
if body.has_meta("last_portal_time"):
if current_time - body.get_meta("last_portal_time") < 3000:
return
body.set_meta("last_portal_time", current_time)
print("[PortalDoor] Player %s entered Door %d in Room %d" % [body.name, door_id, room_id])
emit_signal("player_entered_portal", body, self )