2 Commits

Author SHA1 Message Date
d34f0749bd feat: bubbles setup
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 7s
Create tag and build when new code gets to main / Export (push) Successful in 2m11s
2025-08-01 11:29:35 +02:00
18d1b0b22d 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
2025-08-01 11:13:14 +02:00
9 changed files with 1666 additions and 6 deletions

View File

@ -1,4 +1,5 @@
extends Node2D
class_name SuperCamera
@onready var area_2d: Area2D = $Area2D
@onready var camera: Camera2D = $Camera2D
@ -7,6 +8,7 @@ extends Node2D
@export var minimum_location = 0
@export var maximum_location = 640
signal became_active(SuperCamera)
var is_player_in_range = false
var player: Node2D
@ -29,6 +31,7 @@ func _process(delta: float) -> void:
func _on_body_entered(body: Node2D) -> void:
if body.name == "Player":
became_active.emit(self)
camera.make_current()
player = body
is_player_in_range = true

BIN
fonts/m6x11.ttf Normal file

Binary file not shown.

35
fonts/m6x11.ttf.import Normal file
View File

@ -0,0 +1,35 @@
[remap]
importer="font_data_dynamic"
type="FontFile"
uid="uid://dgdurp0mujjjv"
path="res://.godot/imported/m6x11.ttf-320f9d6ef26922ee8a43f6dace8debd0.fontdata"
[deps]
source_file="res://fonts/m6x11.ttf"
dest_files=["res://.godot/imported/m6x11.ttf-320f9d6ef26922ee8a43f6dace8debd0.fontdata"]
[params]
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
allow_system_fallback=true
force_autohinter=false
hinting=1
subpixel_positioning=4
keep_rounding_remainders=true
oversampling=0.0
Fallbacks=null
fallbacks=[]
Compress=null
compress=true
preload=[]
language_support={}
script_support={}
opentype_features={}

35
main.gd Normal file
View File

@ -0,0 +1,35 @@
extends Node2D
@onready var bubbles: HBoxContainer = $Bubbles
@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.visible = true
bubbles_back.visible = true
bubbles_interior.visible = true
func on_dialogue_ended():
bubbles.visible = false
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

1
main.gd.uid Normal file
View File

@ -0,0 +1 @@
uid://cvtt52wodbopm

File diff suppressed because one or more lines are too long

View File

@ -481,13 +481,13 @@ speed = 200.0
acceleration = 0.177
[node name="Knight" type="AnimatedSprite2D" parent="."]
visible = false
position = Vector2(1, -28)
sprite_frames = SubResource("SpriteFrames_7l6ig")
animation = &"idle"
autoplay = "idle"
[node name="RedHood" type="AnimatedSprite2D" parent="."]
visible = false
position = Vector2(11, -19)
sprite_frames = SubResource("SpriteFrames_mmwog")
animation = &"idle"

View File

@ -25,6 +25,10 @@ window/stretch/mode="viewport"
project/assembly_name="ExampleProject"
[gui]
theme/custom_font="uid://dgdurp0mujjjv"
[input]
move_right={

1526
world_assets/bubbles.tres Normal file

File diff suppressed because it is too large Load Diff