mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 06:51:54 +08:00
feat(武器): 添加tease字段并调整武器卡布局
为武器添加tease文本字段用于显示额外信息 调整武器卡字体大小和布局,添加tease标签显示 更新公鸡角色的武器配置
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
[ext_resource type="Script" uid="uid://c7odfwtug8ds4" path="res://scripts/Structs/Weapon.gd" id="1_g802t"]
|
[ext_resource type="Script" uid="uid://c7odfwtug8ds4" path="res://scripts/Structs/Weapon.gd" id="1_g802t"]
|
||||||
[ext_resource type="Theme" uid="uid://dhvs6urgf6jr5" path="res://themes/main.tres" id="2_fwkd3"]
|
[ext_resource type="Theme" uid="uid://dhvs6urgf6jr5" path="res://themes/main.tres" id="2_fwkd3"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://dwwpkn4q07ja2" path="res://icon.svg" id="2_j0w4u"]
|
||||||
[ext_resource type="PackedScene" uid="uid://ch81vd3awkmhk" path="res://components/UI/WeaponName.tscn" id="3_qv0b1"]
|
[ext_resource type="PackedScene" uid="uid://ch81vd3awkmhk" path="res://components/UI/WeaponName.tscn" id="3_qv0b1"]
|
||||||
[ext_resource type="Texture2D" uid="uid://k13cte17httt" path="res://resources/items/energy.svg" id="4_6gohw"]
|
[ext_resource type="Texture2D" uid="uid://k13cte17httt" path="res://resources/items/energy.svg" id="4_6gohw"]
|
||||||
[ext_resource type="PackedScene" uid="uid://bbm8l3hr4ihar" path="res://components/UI/ItemShow.tscn" id="4_k01vb"]
|
[ext_resource type="PackedScene" uid="uid://bbm8l3hr4ihar" path="res://components/UI/ItemShow.tscn" id="4_k01vb"]
|
||||||
@@ -23,7 +24,7 @@ corner_radius_bottom_right = 5
|
|||||||
corner_radius_bottom_left = 5
|
corner_radius_bottom_left = 5
|
||||||
|
|
||||||
[sub_resource type="LabelSettings" id="LabelSettings_b3nsw"]
|
[sub_resource type="LabelSettings" id="LabelSettings_b3nsw"]
|
||||||
font_size = 13
|
font_size = 12
|
||||||
font_color = Color(0.55, 0.55, 0.55, 1)
|
font_color = Color(0.55, 0.55, 0.55, 1)
|
||||||
|
|
||||||
[node name="WeaponCard" type="PanelContainer" unique_id=2085048785]
|
[node name="WeaponCard" type="PanelContainer" unique_id=2085048785]
|
||||||
@@ -31,6 +32,7 @@ offset_right = 350.0
|
|||||||
offset_bottom = 304.0
|
offset_bottom = 304.0
|
||||||
theme_override_styles/panel = SubResource("StyleBoxFlat_n2ewr")
|
theme_override_styles/panel = SubResource("StyleBoxFlat_n2ewr")
|
||||||
script = ExtResource("1_g802t")
|
script = ExtResource("1_g802t")
|
||||||
|
avatarTexture = ExtResource("2_j0w4u")
|
||||||
sources = Array[String](["无灵"])
|
sources = Array[String](["无灵"])
|
||||||
metadata/_edit_lock_ = true
|
metadata/_edit_lock_ = true
|
||||||
|
|
||||||
@@ -81,6 +83,7 @@ custom_minimum_size = Vector2(75, 75)
|
|||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 4
|
size_flags_horizontal = 4
|
||||||
size_flags_vertical = 0
|
size_flags_vertical = 0
|
||||||
|
texture = ExtResource("2_j0w4u")
|
||||||
expand_mode = 1
|
expand_mode = 1
|
||||||
stretch_mode = 5
|
stretch_mode = 5
|
||||||
|
|
||||||
@@ -157,6 +160,12 @@ bbcode_enabled = true
|
|||||||
text = "[center]造成[color=cyan]10[/color]点伤害。[/center]"
|
text = "[center]造成[color=cyan]10[/color]点伤害。[/center]"
|
||||||
fit_content = true
|
fit_content = true
|
||||||
|
|
||||||
|
[node name="tease" type="Label" parent="container" unique_id=689277044]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
label_settings = SubResource("LabelSettings_b3nsw")
|
||||||
|
horizontal_alignment = 1
|
||||||
|
|
||||||
[node name="costs" type="GridContainer" parent="container" unique_id=1912749879]
|
[node name="costs" type="GridContainer" parent="container" unique_id=1912749879]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
|||||||
@@ -2,9 +2,10 @@
|
|||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://cvogxi7mktumf" path="res://components/Abstracts/EntityBase.tscn" id="1_e5pl8"]
|
[ext_resource type="PackedScene" uid="uid://cvogxi7mktumf" path="res://components/Abstracts/EntityBase.tscn" id="1_e5pl8"]
|
||||||
[ext_resource type="Script" uid="uid://cthtupc6dtbav" path="res://scripts/Contents/Characters/Rooster.gd" id="2_oqdqd"]
|
[ext_resource type="Script" uid="uid://cthtupc6dtbav" path="res://scripts/Contents/Characters/Rooster.gd" id="2_oqdqd"]
|
||||||
[ext_resource type="PackedScene" uid="uid://cx7nogfnv7s8t" path="res://components/Weapons/Tree.tscn" id="3_0omr3"]
|
[ext_resource type="PackedScene" uid="uid://c65tbxm3tclw0" path="res://components/Weapons/Hetun.tscn" id="3_0omr3"]
|
||||||
[ext_resource type="PackedScene" uid="uid://bbrllsqjmx0ie" path="res://components/Weapons/DaoStatue.tscn" id="3_jluqw"]
|
|
||||||
[ext_resource type="AudioStream" uid="uid://cdrevrq7n6yqa" path="res://resources/sounds/effect/Boing.mp3" id="4_66s6c"]
|
[ext_resource type="AudioStream" uid="uid://cdrevrq7n6yqa" path="res://resources/sounds/effect/Boing.mp3" id="4_66s6c"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://bb1uh8k7gkhr7" path="res://components/Weapons/VectorStar.tscn" id="4_jluqw"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://bt4b7ks26fcgi" path="res://components/Weapons/WhiteSoul.tscn" id="4_joj4g"]
|
||||||
[ext_resource type="AudioStream" uid="uid://benyec5bqni0b" path="res://resources/sounds/effect/Chomp.wav" id="4_k0yme"]
|
[ext_resource type="AudioStream" uid="uid://benyec5bqni0b" path="res://resources/sounds/effect/Chomp.wav" id="4_k0yme"]
|
||||||
[ext_resource type="AudioStream" uid="uid://dmxh3bpk8vyy5" path="res://resources/sounds/effect/Coin.mp3" id="5_xnbhq"]
|
[ext_resource type="AudioStream" uid="uid://dmxh3bpk8vyy5" path="res://resources/sounds/effect/Coin.mp3" id="5_xnbhq"]
|
||||||
[ext_resource type="AudioStream" uid="uid://4wuuf1osk0yv" path="res://resources/sounds/effect/Low Boing.wav" id="6_m5px1"]
|
[ext_resource type="AudioStream" uid="uid://4wuuf1osk0yv" path="res://resources/sounds/effect/Low Boing.wav" id="6_m5px1"]
|
||||||
@@ -102,13 +103,13 @@ process_material = SubResource("ParticleProcessMaterial_joj4g")
|
|||||||
[node name="weaponStore" parent="." index="2"]
|
[node name="weaponStore" parent="." index="2"]
|
||||||
process_mode = 4
|
process_mode = 4
|
||||||
|
|
||||||
[node name="DaoStatue" parent="weaponStore" index="0" unique_id=265403254 instance=ExtResource("3_jluqw")]
|
[node name="Hetun" parent="weaponStore" index="0" unique_id=819619036 instance=ExtResource("3_0omr3")]
|
||||||
offset_bottom = 470.0
|
|
||||||
|
[node name="VectorStar" parent="weaponStore" index="1" unique_id=405750024 instance=ExtResource("4_jluqw")]
|
||||||
|
offset_bottom = 394.0
|
||||||
debugRebuild = false
|
debugRebuild = false
|
||||||
|
|
||||||
[node name="Tree" parent="weaponStore" index="1" unique_id=2010233768 instance=ExtResource("3_0omr3")]
|
[node name="WhiteSoul" parent="weaponStore" index="2" unique_id=274428909 instance=ExtResource("4_joj4g")]
|
||||||
offset_bottom = 350.0
|
|
||||||
debugRebuild = false
|
|
||||||
|
|
||||||
[node name="sprint" parent="sounds" index="0"]
|
[node name="sprint" parent="sounds" index="0"]
|
||||||
stream = ExtResource("4_66s6c")
|
stream = ExtResource("4_66s6c")
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ class_name Weapon
|
|||||||
}
|
}
|
||||||
@export_multiline var descriptionTemplate: String = "造成$atk点伤害。"
|
@export_multiline var descriptionTemplate: String = "造成$atk点伤害。"
|
||||||
@export var sources: Array[String] = []
|
@export var sources: Array[String] = []
|
||||||
|
@export var tease: String = ""
|
||||||
@export var needEnergy: float = 0
|
@export var needEnergy: float = 0
|
||||||
@export var cooldown: float = 100
|
@export var cooldown: float = 100
|
||||||
@export var debugRebuild: bool = false
|
@export var debugRebuild: bool = false
|
||||||
@@ -26,6 +27,7 @@ class_name Weapon
|
|||||||
@onready var avatarRect: TextureRect = $"%avatar"
|
@onready var avatarRect: TextureRect = $"%avatar"
|
||||||
@onready var nameLabel: WeaponName = $"%name"
|
@onready var nameLabel: WeaponName = $"%name"
|
||||||
@onready var sourceLabel: Label = $"%source"
|
@onready var sourceLabel: Label = $"%source"
|
||||||
|
@onready var teaseLabel: Label = $"%tease"
|
||||||
@onready var energyLabel: Label = $"%energy"
|
@onready var energyLabel: Label = $"%energy"
|
||||||
@onready var beachball: ItemShow = $"%beachball"
|
@onready var beachball: ItemShow = $"%beachball"
|
||||||
@onready var soul: ItemShow = $"%soul"
|
@onready var soul: ItemShow = $"%soul"
|
||||||
@@ -124,6 +126,7 @@ func rebuildInfo(showNext: bool = false):
|
|||||||
nameLabel.soulLevel = soulLevel
|
nameLabel.soulLevel = soulLevel
|
||||||
nameLabel.level = level
|
nameLabel.level = level
|
||||||
sourceLabel.text = " × ".join(sources)
|
sourceLabel.text = " × ".join(sources)
|
||||||
|
teaseLabel.text = tease
|
||||||
energyLabel.text = "%.1f" % needEnergy
|
energyLabel.text = "%.1f" % needEnergy
|
||||||
beachball.count = costBeachball
|
beachball.count = costBeachball
|
||||||
soul.count = soulLevel
|
soul.count = soulLevel
|
||||||
|
|||||||
Reference in New Issue
Block a user