Files
wgj26/scenes/core/phonebooth.gd
T
bigmstone 3f6b9dc8cc Cleanup
refactor and rename cassette system

- Rename cassette references throughout codebase
- Update scene files and scripts for consistency
- Refactor cassette.gd and related components
- Update player, enemy, and phonebooth interactions
- Sync game_over and pause_screen with new structure
2026-10-04 15:43:24 -06:00

28 lines
840 B
GDScript

extends Node2D
@onready var phonephreak = preload("res://scenes/puzzles/phonephreak.tscn")
func _ready() -> void:
pass # Replace with function body.
func _process(_delta: float) -> void:
pass
func _on_area_2d_body_entered(_body: Node2D) -> void:
if get_parent().get_tree().get_nodes_in_group("Cassettes").is_empty():
if $CanvasLayer.get_children().is_empty():
var inst: Control = phonephreak.instantiate()
$CanvasLayer.add_child(inst)
GlobalData.doing_puzzle = true
inst.set_anchors_and_offsets_preset(Control.PRESET_CENTER, Control.PRESET_MODE_KEEP_SIZE)
inst.grow_vertical = Control.GROW_DIRECTION_BOTH
inst.grow_horizontal = Control.GROW_DIRECTION_BOTH
else:
get_parent().get_node("Speech").say(
"I need to find all the music!",
get_parent().get_parent().get_node("player").SpeechMarker,
5.0
)