ChronoChamber/Scripts/ChronoManager.gd
Clevertop 685d9642dc mew
2024-08-10 17:20:39 +10:00

52 lines
1.2 KiB
GDScript

extends Node3D
# this is basically the level manager
signal broadcast(command : String)
@export_group("Variables")
@export var level_tick : float = 1 # how often to run a command
@export var level_time : float = 10 # the amoutn of time allowed for the level
@export var commands : Array[String]
@export_group("Node References")
@export var gui : Control
# Called when the node enters the scene tree for the first time.
func _ready():
while(commands.size() < level_time / level_tick): # prevent index out of bounds error
commands.append("")
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass
func set_command(position : int, command : String):
commands[position] = command
func start_room():
# open door
# start timers
# start running commands
#hide crosshair
pass
func reset_room():
# run if timer expires, resets puzzle
pass
func finish_room():
# called when player reaches exit
pass
func open_termimal():
gui.terminal_panel.visible = true
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE
#display terminal ui
pass
func _on_player_object_clicked(object):
if(object.name == "Terminal"):
open_termimal()