Update crosshair.png, crosshair.png.import, StartingRoom.tscn, and 7 more files

This commit is contained in:
Clevertop 2024-08-10 17:00:15 +10:00
parent cc3e77a595
commit 40e4281fd4
10 changed files with 283 additions and 278 deletions

46
Scripts/ChronoManager.gd Normal file
View file

@ -0,0 +1,46 @@
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

View file

@ -2,6 +2,7 @@ extends CharacterBody3D
@export var camera : Camera3D
@export var mouse_sensitivity : float = 0.003 # TODO: this is sketchy check that its framerate independant pls
@export var raycast : RayCast3D
const SPEED = 5.0
const JUMP_VELOCITY = 4.5
@ -27,6 +28,10 @@ func _physics_process(delta):
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE
else:
Input.mouse_mode = Input.MOUSE_MODE_CAPTURED
# interact with stuff
if Input.is_action_just_pressed("interact"):
print(raycast.)
# Get the input direction and handle the movement/deceleration.
# As good practice, you should replace UI actions with custom gameplay actions.

17
Scripts/gui.gd Normal file
View file

@ -0,0 +1,17 @@
extends Control
@export_group("Node References")
@export var terminal_panel : Control
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass
func close_terminal():
terminal_panel.visible = false
Input.mouse_mode = Input.MOUSE_MODE_CAPTURED