Implemented basic notification system for weapons changing.

This commit is contained in:
Henry Faber 2026-06-21 17:55:47 +01:00
parent a6d137bf7a
commit 18dc548dd6
16 changed files with 300 additions and 2 deletions

View file

@ -0,0 +1,42 @@
[gd_scene format=3 uid="uid://c3scm07fgpkcp"]
[ext_resource type="Script" uid="uid://3a0cypjsx5cq" path="res://scripts/notification_display.gd" id="1"]
[ext_resource type="Texture2D" uid="uid://dtggedl0127vk" path="res://graphics/stock.png" id="2_nqp5d"]
[node name="NotificationDisplay" type="Control" unique_id=1 node_paths=PackedStringArray("icon", "label")]
layout_mode = 3
anchors_preset = 0
script = ExtResource("1")
icon = NodePath("HBoxContainer/Icon")
label = NodePath("HBoxContainer/Label")
[node name="HBoxContainer" type="HBoxContainer" parent="." unique_id=228546504]
layout_mode = 0
separation = 4
theme_override_constants/margin_left = 4
theme_override_constants/margin_right = 4
[node name="Icon" type="TextureRect" parent="HBoxContainer" unique_id=3]
custom_minimum_size = Vector2(16, 16)
custom_maximum_size = Vector2(16, 16)
propagate_maximum_size = true
layout_mode = 2
size_flags_horizontal = 0
texture = ExtResource("2_nqp5d")
stretch_mode = 1
[node name="Label" type="Label" parent="HBoxContainer" unique_id=4]
layout_mode = 2
size_flags_horizontal = 0
text = "Weapon name"
vertical_alignment = 1
uppercase = true
[node name="Background" type="ColorRect" parent="." unique_id=2]
z_index = -1
layout_mode = 0
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
color = Color(0.13333334, 0.1254902, 0.20392157, 1)

View file

@ -1,13 +1,19 @@
[gd_scene format=3 uid="uid://bj4fytc3sy482"]
[ext_resource type="PackedScene" uid="uid://14fhj8834pkq" path="res://scenes/ui.tscn" id="1_nnsk1"]
[ext_resource type="Script" uid="uid://boce4kgerpff2" path="res://scripts/notification_manager.gd" id="2_k0juu"]
[ext_resource type="Texture2D" uid="uid://b3dqvd23nbmrm" path="res://graphics/cloud layers.png" id="3_4wyf3"]
[ext_resource type="PackedScene" uid="uid://c3scm07fgpkcp" path="res://scenes/notification_display.tscn" id="3_71j4m"]
[ext_resource type="PackedScene" uid="uid://6wq3ynesnsha" path="res://scenes/player.tscn" id="3_k0juu"]
[node name="World" type="Node2D" unique_id=1317852169]
[node name="UI" parent="." unique_id=480295610 instance=ExtResource("1_nnsk1")]
[node name="NotificationManager" type="Node" parent="UI" unique_id=1222543367]
script = ExtResource("2_k0juu")
notification_scene = ExtResource("3_71j4m")
[node name="Level" type="Node2D" parent="." unique_id=934289771]
[node name="Background" type="Node2D" parent="Level" unique_id=485120278]