Added weapon description for weapon selection screen
This commit is contained in:
@@ -8,5 +8,9 @@ script = ExtResource("1_c34y3")
|
||||
id = "cannon"
|
||||
name = "Cannon"
|
||||
group = "explosion"
|
||||
description = "High damage (explosion)
|
||||
Low firerate
|
||||
Moderate velocity
|
||||
High explosion radius"
|
||||
scene = ExtResource("3_2dgua")
|
||||
metadata/_custom_type_script = "uid://870r1efinhqd"
|
||||
|
||||
@@ -8,5 +8,8 @@ script = ExtResource("1_bt4k8")
|
||||
id = "gatling"
|
||||
name = "Gatling"
|
||||
group = "kinetic"
|
||||
description = "Low damage (kinetic)
|
||||
High firerate
|
||||
Moderate velocity"
|
||||
scene = ExtResource("3_2rwg6")
|
||||
metadata/_custom_type_script = "uid://870r1efinhqd"
|
||||
|
||||
@@ -8,5 +8,8 @@ script = ExtResource("1_ipxhy")
|
||||
id = "laser"
|
||||
name = "Laser"
|
||||
group = "energy"
|
||||
description = "Low damage (energetic)
|
||||
High firerate
|
||||
Low velocity"
|
||||
scene = ExtResource("1_aey1r")
|
||||
metadata/_custom_type_script = "uid://870r1efinhqd"
|
||||
|
||||
@@ -8,5 +8,10 @@ script = ExtResource("1_tcis2")
|
||||
id = "launcher"
|
||||
name = "Launcher"
|
||||
group = "explosion"
|
||||
description = "Moderate damage (explosion)
|
||||
Moderate firerate
|
||||
Low velocity
|
||||
Small explosion radius
|
||||
Homing"
|
||||
scene = ExtResource("1_3oqtq")
|
||||
metadata/_custom_type_script = "uid://870r1efinhqd"
|
||||
|
||||
@@ -8,5 +8,10 @@ script = ExtResource("1_152qt")
|
||||
id = "minelayer"
|
||||
name = "Minelayer"
|
||||
group = "explosion"
|
||||
description = "High damage (explosion)
|
||||
Low firerate
|
||||
Low velocity
|
||||
Medium explosion radius
|
||||
Short range"
|
||||
scene = ExtResource("1_fh5qv")
|
||||
metadata/_custom_type_script = "uid://870r1efinhqd"
|
||||
|
||||
@@ -8,5 +8,8 @@ script = ExtResource("1_3fasx")
|
||||
id = "plasma"
|
||||
name = "Plasma"
|
||||
group = "energy"
|
||||
description = "Moderate damage (energetic)
|
||||
Moderate firerate
|
||||
Moderate velocity"
|
||||
scene = ExtResource("1_rcvob")
|
||||
metadata/_custom_type_script = "uid://870r1efinhqd"
|
||||
|
||||
@@ -8,5 +8,9 @@ script = ExtResource("1_6lcn5")
|
||||
id = "railgun"
|
||||
name = "Railgun"
|
||||
group = "kinetic"
|
||||
description = "High damage (kinetic)
|
||||
Low firerate
|
||||
High velocity
|
||||
Can pierce enemies"
|
||||
scene = ExtResource("1_cbt0i")
|
||||
metadata/_custom_type_script = "uid://870r1efinhqd"
|
||||
|
||||
@@ -8,5 +8,10 @@ script = ExtResource("1_xds2o")
|
||||
id = "shrapnel"
|
||||
name = "Shrapnel"
|
||||
group = "kinetic"
|
||||
description = "High damage (kinetic)
|
||||
Moderate firerate
|
||||
Moderate velocity
|
||||
Short range
|
||||
Multiple projectiles"
|
||||
scene = ExtResource("1_8lpql")
|
||||
metadata/_custom_type_script = "uid://870r1efinhqd"
|
||||
|
||||
@@ -8,5 +8,10 @@ script = ExtResource("1_a16gw")
|
||||
id = "tesla"
|
||||
name = "Tesla"
|
||||
group = "energy"
|
||||
description = "Moderate damage (energetic)
|
||||
Low firerate
|
||||
High velocity
|
||||
Hits nearest target
|
||||
Can pierce enemies"
|
||||
scene = ExtResource("1_uxb6m")
|
||||
metadata/_custom_type_script = "uid://870r1efinhqd"
|
||||
|
||||
@@ -6,4 +6,6 @@ extends Resource
|
||||
@export var name: String
|
||||
@export var group: String
|
||||
|
||||
@export_multiline var description: String
|
||||
|
||||
@export var scene: PackedScene
|
||||
|
||||
@@ -9,8 +9,9 @@ signal weapon_selected(weapon_data: WeaponData)
|
||||
set = _set_weapon_data
|
||||
|
||||
|
||||
@onready var name_label : Label = $%NameLabel
|
||||
@onready var button : Button = $%Button
|
||||
@onready var name_label : Label = $%NameLabel
|
||||
@onready var description_label : Label = $%DescriptionLabel
|
||||
|
||||
|
||||
func _set_weapon_data(data: WeaponData) -> void:
|
||||
@@ -19,6 +20,7 @@ func _set_weapon_data(data: WeaponData) -> void:
|
||||
if weapon_data == null: return
|
||||
|
||||
name_label.text = weapon_data.name
|
||||
description_label.text = weapon_data.description
|
||||
|
||||
|
||||
func _on_button_pressed() -> void:
|
||||
|
||||
@@ -9,6 +9,10 @@ anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme_override_constants/margin_left = 10
|
||||
theme_override_constants/margin_top = 10
|
||||
theme_override_constants/margin_right = 10
|
||||
theme_override_constants/margin_bottom = 10
|
||||
script = ExtResource("1_4acia")
|
||||
|
||||
[node name="Button" type="Button" parent="."]
|
||||
@@ -23,10 +27,20 @@ theme_override_constants/margin_top = 10
|
||||
theme_override_constants/margin_right = 10
|
||||
theme_override_constants/margin_bottom = 10
|
||||
|
||||
[node name="NameLabel" type="Label" parent="MarginContainer"]
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="NameLabel" type="Label" parent="MarginContainer/VBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
theme = ExtResource("2_g83h6")
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="DescriptionLabel" type="Label" parent="MarginContainer/VBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(160, 0)
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 8
|
||||
horizontal_alignment = 1
|
||||
|
||||
[connection signal="pressed" from="Button" to="." method="_on_button_pressed"]
|
||||
|
||||
Reference in New Issue
Block a user