feat: bubble location
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 6s
Create tag and build when new code gets to main / Export (push) Successful in 2m11s

This commit is contained in:
2025-08-01 11:13:14 +02:00
parent 01aee48501
commit 18d1b0b22d
6 changed files with 1583 additions and 6 deletions

32
main.gd Normal file
View File

@ -0,0 +1,32 @@
extends Node2D
@onready var bubbles_back: TileMapLayer = $BubblesBack
@onready var bubbles_interior: TileMapLayer = $BubblesInterior
var active_camera: SuperCamera
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
for child in get_children():
if is_instance_of(child, SuperCamera):
child.became_active.connect(on_camera_became_active)
func on_camera_became_active(camera: SuperCamera):
active_camera = camera
func on_dialogue_started():
bubbles_back.visible = true
bubbles_interior.visible = true
func on_dialogue_ended():
bubbles_back.visible = false
bubbles_interior.visible = false
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
bubbles_back.global_position.x = active_camera.global_position.x
bubbles_interior.global_position.x = active_camera.global_position.x