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
This commit is contained in:
1 parent
acdee757cb
commit
3f6b9dc8cc
17 files changed
+24
-55
No files matched your search
@@ -6,23 +6,16 @@ func _ready() -> void:
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
func _process(_delta: float) -> void:
|
||||
pass
|
||||
|
||||
|
||||
func _on_area_2d_body_entered(body: Node2D) -> void:
|
||||
if get_parent().get_tree().get_nodes_in_group("Cassets").is_empty():
|
||||
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)
|
||||
print("== IMMEDIATE ==")
|
||||
_dump(inst)
|
||||
await get_tree().process_frame
|
||||
await get_tree().process_frame
|
||||
print("== AFTER 2 FRAMES ==")
|
||||
_dump(inst)
|
||||
GlobalData.doing_puzzle = true
|
||||
$CanvasLayer.add_child(inst)
|
||||
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
|
||||
@@ -32,22 +25,3 @@ func _on_area_2d_body_entered(body: Node2D) -> void:
|
||||
get_parent().get_parent().get_node("player").SpeechMarker,
|
||||
5.0
|
||||
)
|
||||
|
||||
func _dump(inst: Control) -> void:
|
||||
var vp := get_viewport()
|
||||
print("window size: ", get_window().size, " content_scale_mode: ", get_window().content_scale_mode)
|
||||
print("visible_rect: ", vp.get_visible_rect(), " -> screen center: ", vp.get_visible_rect().size / 2.0)
|
||||
print("layer: offset=", $CanvasLayer.offset, " scale=", $CanvasLayer.scale, " rotation=", $CanvasLayer.rotation,
|
||||
" follow_viewport=", $CanvasLayer.follow_viewport_enabled)
|
||||
print("root: type=", inst.get_class(), " pos=", inst.position, " size=", inst.size,
|
||||
" min=", inst.get_combined_minimum_size(), " scale=", inst.scale, " pivot=", inst.pivot_offset)
|
||||
print("root anchors L/T/R/B: ", inst.anchor_left, " ", inst.anchor_top, " ", inst.anchor_right, " ", inst.anchor_bottom,
|
||||
" offsets: ", inst.offset_left, " ", inst.offset_top, " ", inst.offset_right, " ", inst.offset_bottom)
|
||||
print("root global_rect: ", inst.get_global_rect(), " -> its center: ", inst.get_global_rect().get_center())
|
||||
print("root parent: ", inst.get_parent().name, " (", inst.get_parent().get_class(), ")")
|
||||
for c in inst.get_children():
|
||||
if c is Control:
|
||||
print(" child ", c.name, " (", c.get_class(), ") global_rect=", c.get_global_rect(),
|
||||
" visible=", c.visible, " anchors preset-ish: ", c.anchor_left, ",", c.anchor_top, ",", c.anchor_right, ",", c.anchor_bottom)
|
||||
else:
|
||||
print(" child ", c.name, " (", c.get_class(), ")")
|
||||
Reference in new issue
Block a user