feat: implement Tekton Doors game mode with arena setup, portal management, connection randomization, and game state timers.
This commit is contained in:
+12
-4
@@ -34,25 +34,33 @@ func _on_body_entered(body: Node3D):
|
||||
|
||||
if body.is_in_group("Players") or body.get("is_bot"):
|
||||
print("[PortalDoor] Player %s entered Door %d in Room %d" % [body.name, door_id, room_id])
|
||||
emit_signal("player_entered_portal", body, self)
|
||||
emit_signal("player_entered_portal", body, self )
|
||||
|
||||
var _materials_initialized: bool = false
|
||||
|
||||
func _update_visuals():
|
||||
if not is_node_ready() or not is_inside_tree(): return
|
||||
# Removed is_node_ready() check to allow early setter calls to prepare variables,
|
||||
# but we still need the nodes to exist to apply them.
|
||||
if not is_inside_tree(): return
|
||||
|
||||
var vortex = get_node_or_null("Vortex")
|
||||
var frame_left = get_node_or_null("Frame_Left")
|
||||
|
||||
# If children aren't there yet, we can't update visuals.
|
||||
# This usually happens if called before or during early _ready.
|
||||
if not vortex or not frame_left: return
|
||||
|
||||
if not _materials_initialized:
|
||||
_initialize_unique_materials()
|
||||
_materials_initialized = true
|
||||
|
||||
var vortex = get_node_or_null("Vortex")
|
||||
if vortex:
|
||||
var mat = vortex.get_surface_override_material(0)
|
||||
if mat:
|
||||
mat.albedo_color = portal_color
|
||||
mat.albedo_color.a = 0.5
|
||||
if mat.has_method("set_emission"):
|
||||
mat.emission = portal_color
|
||||
mat.set("emission", portal_color)
|
||||
|
||||
for part_name in ["Frame_Left", "Frame_Right", "Frame_Top"]:
|
||||
var frame = get_node_or_null(part_name)
|
||||
|
||||
Reference in New Issue
Block a user