mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-06-09 05:07:12 +08:00
feat(物品系统): 新增灵魂物品类型及相关功能
- 在ItemStore.gd中添加SOUL物品类型及其映射 - 在EntityBase.gd中为物品栏添加SOUL类型及其上限 - 新增灵魂物品的SVG图标及导入配置 - 为角色(KukeMC, Bear, Chick)添加灵魂掉落配置 - 在武器卡片界面添加灵魂提炼和镶嵌按钮
This commit is contained in:
@@ -41,12 +41,32 @@ layout_mode = 2
|
||||
theme_override_constants/separation = 10
|
||||
alignment = 1
|
||||
|
||||
[node name="updateBtn" type="Button" parent="container"]
|
||||
[node name="wrapper" type="VBoxContainer" parent="container"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="updateBtn" type="Button" parent="container/wrapper"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
theme = ExtResource("2_fwkd3")
|
||||
text = "升级"
|
||||
|
||||
[node name="souls" type="HBoxContainer" parent="container/wrapper"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="extractBtn" type="Button" parent="container/wrapper/souls"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
theme = ExtResource("2_fwkd3")
|
||||
text = "提炼灵魂"
|
||||
|
||||
[node name="inlayBtn" type="Button" parent="container/wrapper/souls"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
theme = ExtResource("2_fwkd3")
|
||||
text = "镶嵌灵魂"
|
||||
|
||||
[node name="info" type="VBoxContainer" parent="container"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 10
|
||||
|
||||
@@ -143,6 +143,8 @@ alpha_curve = SubResource("CurveTexture_8q862")
|
||||
[node name="Bear" instance=ExtResource("1_3ves7")]
|
||||
script = ExtResource("2_kh2af")
|
||||
displayName = "熊谷凌"
|
||||
drops = Array[int]([0, 1, 4])
|
||||
dropCounts = Array[Vector2]([Vector2(50, 100), Vector2(70, 140), Vector2(4, 10)])
|
||||
metadata/_edit_vertical_guides_ = [-50.0]
|
||||
|
||||
[node name="attack0" parent="sounds" index="5"]
|
||||
|
||||
@@ -37,8 +37,8 @@ animations = [{
|
||||
script = ExtResource("2_r6bub")
|
||||
isBoss = true
|
||||
displayName = "小鸡"
|
||||
drops = Array[int]([0, 1])
|
||||
dropCounts = Array[Vector2]([Vector2(10, 30), Vector2(15, 50)])
|
||||
drops = Array[int]([0, 1, 4])
|
||||
dropCounts = Array[Vector2]([Vector2(10, 30), Vector2(15, 50), Vector2(1, 3)])
|
||||
appleCount = Vector2i(2, 4)
|
||||
|
||||
[node name="hurt" parent="sounds" index="3"]
|
||||
|
||||
@@ -29,6 +29,8 @@ size = Vector2(150, 150)
|
||||
[node name="KukeMC" instance=ExtResource("1_r4q7y")]
|
||||
script = ExtResource("2_s2dg5")
|
||||
displayName = "酷可mc"
|
||||
drops = Array[int]([0, 1, 4])
|
||||
dropCounts = Array[Vector2]([Vector2(20, 40), Vector2(25, 100), Vector2(2, 3)])
|
||||
metadata/_edit_vertical_guides_ = [76.0]
|
||||
|
||||
[node name="collect" parent="sounds" index="4"]
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="39.96872" height="39.96872" viewBox="0,0,39.96872,39.96872"><g transform="translate(-220.01564,-160.01564)"><g fill="#ffffff" stroke="none" stroke-width="0" stroke-linecap="round" stroke-miterlimit="10"><g><g><path d="M245.88013,180.14782l-5.90839,-20.13218l-5.86641,19.98913h11.78934"/><path d="M245.88013,179.85218l-5.90839,20.13218l-5.86641,-19.98913h11.78934"/></g><g><path d="M240.14782,174.11987l-20.13218,5.90839l19.98913,5.86641v-11.78934"/><path d="M239.85218,174.11987l20.13218,5.90839l-19.98913,5.86641v-11.78934"/></g></g></g></g></svg><!--rotationCenter:19.984360513549035:19.9843606777562-->
|
||||
|
After Width: | Height: | Size: 709 B |
@@ -0,0 +1,37 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://7jhhyoinptns"
|
||||
path="res://.godot/imported/soul.svg-be1bba571183bafbd4f4f2057b205ffb.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://resources/items/soul.svg"
|
||||
dest_files=["res://.godot/imported/soul.svg-be1bba571183bafbd4f4f2057b205ffb.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
svg/scale=1.0
|
||||
editor/scale_with_editor_scale=false
|
||||
editor/convert_colors_with_editor_theme=false
|
||||
@@ -57,12 +57,14 @@ var inventory = {
|
||||
ItemStore.ItemType.BASKETBALL: 500,
|
||||
ItemStore.ItemType.APPLE: 5,
|
||||
ItemStore.ItemType.BEACHBALL: 0,
|
||||
ItemStore.ItemType.SOUL: 0,
|
||||
}
|
||||
var inventoryMax = {
|
||||
ItemStore.ItemType.BASEBALL: INF, # 无限
|
||||
ItemStore.ItemType.BASKETBALL: INF,
|
||||
ItemStore.ItemType.APPLE: 5,
|
||||
ItemStore.ItemType.BEACHBALL: INF,
|
||||
ItemStore.ItemType.SOUL: INF,
|
||||
}
|
||||
|
||||
@export var defaultCooldownUnit: float = 100
|
||||
|
||||
@@ -5,19 +5,22 @@ enum ItemType {
|
||||
BASEBALL,
|
||||
BASKETBALL,
|
||||
APPLE,
|
||||
BEACHBALL
|
||||
BEACHBALL,
|
||||
SOUL,
|
||||
}
|
||||
static var nameMap = {
|
||||
ItemType.BASEBALL: "棒球",
|
||||
ItemType.BASKETBALL: "篮球",
|
||||
ItemType.APPLE: "苹果",
|
||||
ItemType.BEACHBALL: "沙滩球"
|
||||
ItemType.BEACHBALL: "沙滩球",
|
||||
ItemType.SOUL: "灵魂",
|
||||
}
|
||||
static var idMap = {
|
||||
ItemType.BASEBALL: "baseball",
|
||||
ItemType.BASKETBALL: "basketball",
|
||||
ItemType.APPLE: "apple",
|
||||
ItemType.BEACHBALL: "beachball"
|
||||
ItemType.BEACHBALL: "beachball",
|
||||
ItemType.SOUL: "soul",
|
||||
}
|
||||
static func getTexture(type: ItemType) -> Texture2D:
|
||||
return load("res://resources/items/%s.svg" % idMap[type])
|
||||
|
||||
Reference in New Issue
Block a user