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