Add FloatingTextManager and FloatingText for displaying UI messages; update CollectableComponent and HealthComponent to utilize new floating text features

This commit is contained in:
2025-09-11 04:35:30 +02:00
parent f9cb59d182
commit f229ff5b7d
16 changed files with 131 additions and 139 deletions

View File

@@ -1,8 +0,0 @@
[gd_scene load_steps=3 format=3 uid="uid://dpibw6s3dcggr"]
[ext_resource type="Script" uid="uid://i06td076ej68" path="res://Autoloads/DamageNumberManager.cs" id="1_me007"]
[ext_resource type="PackedScene" uid="uid://c7mp0o2goauyy" path="res://objects/ui/damage_number.tscn" id="2_ghslv"]
[node name="DamageNumberManager" type="Node"]
script = ExtResource("1_me007")
DamageNumberScene = ExtResource("2_ghslv")

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=53 format=3 uid="uid://bqi5s710xb1ju"]
[gd_scene load_steps=52 format=3 uid="uid://bqi5s710xb1ju"]
[ext_resource type="Script" uid="uid://csel4s0e4g5uf" path="res://scripts/components/PlayerController.cs" id="1_yysbb"]
[ext_resource type="Shader" uid="uid://bs4xvm4qkurpr" path="res://shaders/hit_flash.tres" id="2_lgb3u"]
@@ -37,7 +37,6 @@
[ext_resource type="Script" uid="uid://dr3uv0j7n75s" path="res://scripts/components/ShipShooterComponent.cs" id="30_usc1p"]
[ext_resource type="AudioStream" uid="uid://dyev46uqusimi" path="res://sfx/shoot.wav" id="32_x2b7c"]
[ext_resource type="PackedScene" uid="uid://dtem8jgcyoqar" path="res://objects/entities/green_laser.tscn" id="36_oxudy"]
[ext_resource type="Script" uid="uid://diw6opv6yutgi" path="res://scripts/components/KillPlayerOutOfScreenComponent.cs" id="37_qec3q"]
[ext_resource type="Script" uid="uid://dupnaark1f7gm" path="res://scripts/components/ProgressiveDamageComponent.cs" id="38_dhjci"]
[ext_resource type="Script" uid="uid://dssa2taiwktis" path="res://scripts/components/Movement/PlayerInputHandler.cs" id="42_e5pae"]
[ext_resource type="Script" uid="uid://ceoxet1nqws8w" path="res://scripts/components/SpriteTilterComponent.cs" id="43_xuhvf"]
@@ -278,11 +277,6 @@ gizmo_extents = 1.0
position = Vector2(0, 3)
scale = Vector2(0.8, 1.9)
[node name="KillPlayerOutOfScreen" type="Node" parent="." node_paths=PackedStringArray("ScreenNotifier", "HealthComponent")]
script = ExtResource("37_qec3q")
ScreenNotifier = NodePath("../VisibleOnScreenNotifier2D")
HealthComponent = NodePath("../HealthComponent")
[node name="PlayerInputHandler" type="Node" parent="."]
script = ExtResource("42_e5pae")
metadata/_custom_type_script = "uid://dssa2taiwktis"

View File

@@ -1,15 +0,0 @@
[gd_scene load_steps=2 format=3 uid="uid://c7mp0o2goauyy"]
[ext_resource type="Script" uid="uid://bbupymh6krrgx" path="res://scripts/UI/DamageNumber.cs" id="1_yv42p"]
[node name="DamageNumber" type="Label"]
offset_right = 40.0
offset_bottom = 8.0
theme_override_constants/outline_size = 1
theme_override_constants/shadow_outline_size = 3
theme_override_font_sizes/font_size = 8
text = "23"
horizontal_alignment = 1
vertical_alignment = 1
script = ExtResource("1_yv42p")
metadata/_custom_type_script = "uid://bbupymh6krrgx"