title screen
This commit is contained in:
parent
2fd199612b
commit
d464e0499b
12 changed files with 147 additions and 7 deletions
25
levels/level.gd
Normal file
25
levels/level.gd
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
class_name Level
|
||||
extends Node3D
|
||||
|
||||
signal level_started
|
||||
|
||||
static var level: Level
|
||||
|
||||
@export var active := false
|
||||
var start_time_msec := 0
|
||||
|
||||
static func start_game() -> void:
|
||||
if level:
|
||||
level.active = true
|
||||
level.level_started.emit()
|
||||
level.start_time_msec = Time.get_ticks_msec()
|
||||
|
||||
|
||||
static func is_active() -> bool:
|
||||
if level:
|
||||
return level.active
|
||||
else:
|
||||
return false
|
||||
|
||||
func _ready() -> void:
|
||||
level = self
|
||||
Loading…
Add table
Add a link
Reference in a new issue