2025-05-16 15:56:55 +10:00
|
|
|
extends Channel
|
|
|
|
|
|
2025-05-16 22:57:02 +10:00
|
|
|
var platformer_online : bool = true
|
|
|
|
|
|
|
|
|
|
func _ready() -> void:
|
|
|
|
|
#GameManager.end_platformer.connect(end_channel) #maybe?
|
|
|
|
|
pass
|
|
|
|
|
|
2025-05-16 15:56:55 +10:00
|
|
|
func _process(delta: float) -> void:
|
|
|
|
|
offline_channel_cover.visible = channel_mode == Mode.Offline
|
|
|
|
|
static_channel_cover.visible = channel_mode == Mode.Static
|
2025-05-16 22:57:02 +10:00
|
|
|
if platformer_online :
|
|
|
|
|
modulate = Color.WHITE
|
|
|
|
|
else:
|
|
|
|
|
modulate = Color.DIM_GRAY
|
2025-05-16 15:56:55 +10:00
|
|
|
|
|
|
|
|
func start_specific_channel(scene : PackedScene):
|
|
|
|
|
var new_scene = scene.instantiate()
|
2025-05-16 22:13:34 +10:00
|
|
|
new_scene.game_win.connect(win_channel)
|
|
|
|
|
new_scene.game_lose.connect(lose_channel)
|
2025-05-16 15:56:55 +10:00
|
|
|
game_viewport.add_child(new_scene)
|
|
|
|
|
channel_mode = Mode.Online
|
|
|
|
|
|
|
|
|
|
func start_channel():
|
2025-05-16 22:57:02 +10:00
|
|
|
#start_specific_channel(channel_scene)
|
|
|
|
|
print("we do a bit of ovveridng")
|
|
|
|
|
platformer_online = true
|
|
|
|
|
GameManager.start_platformer.emit()
|
|
|
|
|
|
2025-05-16 15:56:55 +10:00
|
|
|
|
|
|
|
|
func end_channel():
|
2025-05-16 22:57:02 +10:00
|
|
|
#channel_mode = Mode.Static
|
|
|
|
|
#modulate = Color.DIM_GRAY
|
|
|
|
|
platformer_online = false
|
2025-05-16 15:56:55 +10:00
|
|
|
# TODO: a bunch of stuff here
|
2025-05-16 22:13:34 +10:00
|
|
|
## bro what did you mean when you meant this T_T
|
2025-05-16 15:56:55 +10:00
|
|
|
#game_viewport.get_child(0).queue_free()
|