started work on door and other various
This commit is contained in:
parent
de8bd57c62
commit
419ee45597
6 changed files with 45 additions and 4 deletions
|
|
@ -7,6 +7,7 @@ signal tick(time : int)
|
|||
@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 level_name : String = "Level X\nTest Room"
|
||||
|
||||
#reset these
|
||||
var tick_timer : float = 0
|
||||
|
|
@ -35,7 +36,7 @@ func _ready():
|
|||
pedestals.append(temp)
|
||||
for i in pedestals.size():
|
||||
pedestals[i].mesh.mesh = pedestals[i].mesh.mesh.duplicate()
|
||||
pass # Replace with function body.
|
||||
gui.show_level_title(level_name)
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
|
|
@ -80,6 +81,8 @@ func _process(delta):
|
|||
gui.show_lose_screen("", fail_timer)
|
||||
world_env.environment.background_color = Color.DIM_GRAY
|
||||
fail_timer -= delta
|
||||
if(Input.is_action_just_pressed("reset") and fail_timer < 1.95):
|
||||
fail_timer = 0
|
||||
if fail_timer < 0:
|
||||
fail_timer = 2
|
||||
reset_room()
|
||||
|
|
@ -127,7 +130,7 @@ func reset_room():
|
|||
room_started = false
|
||||
current_tick = 0
|
||||
failed = false
|
||||
fail_timer = 3
|
||||
fail_timer = 2
|
||||
|
||||
#reset pedestals
|
||||
for i in pedestals.size():
|
||||
|
|
@ -137,6 +140,10 @@ func reset_room():
|
|||
# replace door
|
||||
# put player back in start room
|
||||
# reset timers
|
||||
|
||||
player.clear_effects()
|
||||
gui.show_level_title(level_name)
|
||||
|
||||
pass
|
||||
|
||||
func finish_room():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue