feat: implement Tekton NPC with movement, combat, and interaction mechanics, and add initial portal system components.
This commit is contained in:
@@ -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 )
|
||||
|
||||
|
||||
Reference in New Issue
Block a user