Restructuring of Nodes and Scenes. Added WorldCamera. Added a Main Scene.

This commit is contained in:
gdz
2025-12-07 14:15:24 +01:00
parent 2a5fdec16a
commit de8a4e5e91
16 changed files with 128 additions and 81 deletions

View File

@@ -0,0 +1,15 @@
extends VisibleOnScreenNotifier2D
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
_calculateRect()
get_tree().root.size_changed.connect(_calculateRect)
func _calculateRect():
var multiplier: float = get_viewport_rect().size.y / get_viewport_rect().size.x
var size: float = 640 / multiplier
rect.position.y = -size/2
rect.size.y = size