cool stuff

This commit is contained in:
Tabby 2025-05-25 15:14:49 +10:00
parent a9be913adb
commit 44be9924a6
11 changed files with 202 additions and 29 deletions

View file

@ -20,6 +20,7 @@ var door_timer : float = 0
@export_group("Resources")
@export var pedestal_off_mat : Material
@export var pedestal_on_mat : Material
@export var pedestal_activated_cols : Array[Material]
@export_group("Node References")
@export var gui : Control
@ -57,8 +58,8 @@ func _process(delta):
#if Input.is_action_just_pressed("debug_start"):
#start_room()
if Input.is_action_just_pressed("interact"):
Input.mouse_mode = Input.MOUSE_MODE_CAPTURED
#if Input.is_action_just_pressed("interact"):
#Input.mouse_mode = Input.MOUSE_MODE_CAPTURED
if Input.is_action_just_pressed("reset"):
gui.show_lose_screen("Reset Pressed", 2)
@ -81,7 +82,8 @@ func _process(delta):
for i in pedestals.size():
if i+1 == current_tick:
var activated_pedestal = pedestals[i]
activated_pedestal.mesh.mesh.material = pedestal_on_mat
#activated_pedestal.mesh.mesh.material = pedestal_on_mat
activated_pedestal.mesh.mesh.material = pedestal_activated_cols[i]
if activated_pedestal.has_command:
print("broadcasting: " + activated_pedestal.placed_command.command_name)
broadcast.emit(activated_pedestal.placed_command.command_name)
@ -190,3 +192,8 @@ func _player_area_entered(area : Area3D):
if not player.collider.disabled:
fail_room()
gui.show_lose_screen("Touched a reset block", 2)
func pause():
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE
gui.open_pause()
process_mode = Node.PROCESS_MODE_DISABLED