refactored. very tired.
This commit is contained in:
1 parent
158339d042
commit
77c8195ba9
20 files changed
+285
-143
No files matched your search
@@ -0,0 +1,51 @@
|
||||
#@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
|
||||
File renamed without changes.
@@ -1,53 +0,0 @@
|
||||
#@tool
|
||||
#@icon(icon_path: String)
|
||||
#class_name MyNode
|
||||
extends Node2D
|
||||
## Documentation comments
|
||||
|
||||
## signal
|
||||
## enum
|
||||
## const
|
||||
|
||||
@onready var conductor: Musician = %Conductor
|
||||
@onready var violinist: Musician = %Violinist
|
||||
@onready var cellist: Musician = %Cellist
|
||||
@onready var bassist: Musician = %Bassist
|
||||
#@onready var rhythm_manager: RhythmManager = %RhythmManager
|
||||
#@onready var click_track: AudioStreamPlayer2D = %ClickTrack
|
||||
@onready var canvas_modulate: CanvasModulate = $CanvasModulate
|
||||
|
||||
## OVERRIDES
|
||||
|
||||
func _ready() -> void:
|
||||
canvas_modulate.visible = true
|
||||
|
||||
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
|
||||
#
|
||||
#func enter_instrument(instrument: Node) -> void:
|
||||
#print("Now playing " + instrument.name)
|
||||
#var instrument_audio: AudioStreamPlayer2D = instrument.get_child(0)
|
||||
#var instrument_light: PointLight2D = instrument.get_child(1)
|
||||
#instrument.play("default")
|
||||
#instrument_audio.play()
|
||||
#instrument_light.visible = true
|
||||
|
||||
## PRIVATE/HELPER
|
||||
|
||||
## RECEIVERS
|
||||
|
||||
## SETTERS/GETTERS
|
||||
+2
-2
@@ -4,8 +4,8 @@ class_name Musician
|
||||
extends AnimatedSprite2D
|
||||
## Documentation comments
|
||||
|
||||
# signal
|
||||
# enum
|
||||
#signal
|
||||
#enum
|
||||
#const
|
||||
|
||||
@export_group("Input Textures")
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
#@tool
|
||||
#@icon(icon_path: String)
|
||||
extends Node
|
||||
## Documentation comments
|
||||
|
||||
#signal
|
||||
#enum
|
||||
#const
|
||||
#@export var
|
||||
var levels: Array[Level]
|
||||
var current_level: Level
|
||||
#@onready var
|
||||
|
||||
## OVERRIDES
|
||||
|
||||
func _ready() -> void:
|
||||
pass
|
||||
|
||||
#func _process(_delta: float) -> void:
|
||||
#pass
|
||||
|
||||
|
||||
## CORE
|
||||
func build_level(level_number: int) -> void:
|
||||
print_debug("Building level #%s" % level_number)
|
||||
|
||||
## PRIVATE/HELPER
|
||||
|
||||
## RECEIVERS
|
||||
|
||||
## SETTERS/GETTERS
|
||||
@@ -0,0 +1 @@
|
||||
uid://cu715fqwadsd
|
||||
@@ -0,0 +1,32 @@
|
||||
#@tool
|
||||
#@icon(icon_path: String)
|
||||
class_name Tilemaps
|
||||
extends Node2D
|
||||
## Documentation comments
|
||||
|
||||
#signal
|
||||
#enum
|
||||
#const
|
||||
#@export var
|
||||
#var
|
||||
|
||||
@onready var canvas_modulate: CanvasModulate = $CanvasModulate
|
||||
|
||||
## OVERRIDES
|
||||
|
||||
func _ready() -> void:
|
||||
pass
|
||||
|
||||
func _process(_delta: float) -> void:
|
||||
pass
|
||||
|
||||
func _physics_process(_delta: float) -> void:
|
||||
pass
|
||||
|
||||
## CORE
|
||||
|
||||
## PRIVATE/HELPER
|
||||
|
||||
## RECEIVERS
|
||||
|
||||
## SETTERS/GETTERS
|
||||
@@ -0,0 +1 @@
|
||||
uid://dfyxb4u0rfayk
|
||||
Reference in new issue
Block a user