barebones menu and credits

This commit is contained in:
Clevertop 2024-08-11 22:19:23 +10:00
parent 78d24cecfa
commit 1a00e03306
5 changed files with 166 additions and 4 deletions

View file

@ -15,6 +15,7 @@ var room_started : bool = false
var current_tick = 0
var failed : bool = false
var fail_timer : float = 2
var door_timer : float = 0
@export_group("Resources")
@export var pedestal_off_mat : Material
@ -28,6 +29,8 @@ var pedestals : Array[Pedestal]
@export var world_env : WorldEnvironment
@export var player : CharacterBody3D
@export var player_spawn : Node3D
@export var left_door : Node3D
@export var right_door : Node3D
# Called when the node enters the scene tree for the first time.
func _ready():
@ -41,6 +44,12 @@ func _ready():
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
if(room_started):
door_timer -= delta
#-1.5 open, -0.5 closed
left_door.position.x = -0.5 + clampf(door_timer*4, -0.995,0)
right_door.position.x = 0.5 + clampf(-door_timer*4, 0,0.995)
if Input.is_action_just_pressed("debug_start"):
start_room()
@ -131,6 +140,7 @@ func reset_room():
current_tick = 0
failed = false
fail_timer = 2
door_timer = 0
#reset pedestals
for i in pedestals.size():