52 lines
966 B
GDScript3
52 lines
966 B
GDScript3
|
|
#@tool
|
||
|
|
#@icon(icon_path: String)
|
||
|
|
class_name Level
|
||
|
|
extends Node2D
|
||
|
|
## Documentation comments
|
||
|
|
|
||
|
|
#signal
|
||
|
|
#enum
|
||
|
|
#const
|
||
|
|
|
||
|
|
@export var level_number: int = 0
|
||
|
|
|
||
|
|
# Musicians
|
||
|
|
@onready var conductor: Musician = %Conductor
|
||
|
|
@onready var violinist: Musician = %Violinist
|
||
|
|
@onready var cellist: Musician = %Cellist
|
||
|
|
@onready var bassist: Musician = %Bassist
|
||
|
|
@onready var tilemaps: Tilemaps = $Tilemaps
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
## OVERRIDES
|
||
|
|
|
||
|
|
func _ready() -> void:
|
||
|
|
tilemaps.canvas_modulate.visible = true
|
||
|
|
SceneManager.build_level(level_number)
|
||
|
|
|
||
|
|
#func _process(_delta: float) -> void:
|
||
|
|
#pass
|
||
|
|
#
|
||
|
|
#func _physics_process(_delta: float) -> void:
|
||
|
|
#pass
|
||
|
|
|
||
|
|
func _unhandled_input(event: InputEvent) -> void:
|
||
|
|
if event.is_action_pressed("ready"):
|
||
|
|
conductor.enter_exit()
|
||
|
|
if event.is_action_pressed("viol"):
|
||
|
|
violinist.enter_exit()
|
||
|
|
if event.is_action_pressed("cello"):
|
||
|
|
cellist.enter_exit()
|
||
|
|
if event.is_action_pressed("bass"):
|
||
|
|
bassist.enter_exit()
|
||
|
|
|
||
|
|
## CORE
|
||
|
|
|
||
|
|
## PRIVATE/HELPER
|
||
|
|
|
||
|
|
## RECEIVERS
|
||
|
|
|
||
|
|
## SETTERS/GETTERS
|