1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-28 06:51:54 +08:00

feat(资源): 添加钻石巧克力和猫头鹰角色资源

新增钻石巧克力(Diamond.tscn)和猫头鹰(MTY.tscn)角色资源及相关图片文件
调整猫和狗的掉落物品数量范围
修改EntityBase.gd中物品掉落数量的计算逻辑
This commit is contained in:
2025-12-07 16:39:43 +08:00
parent c246565795
commit 4fc1daae0d
9 changed files with 152 additions and 3 deletions
+1 -1
View File
@@ -38,7 +38,7 @@ radius = 19.026299
script = ExtResource("2_uo67a")
displayName = "猫"
drops = Array[int]([0])
dropCounts = Array[Vector2]([Vector2(8, 16)])
dropCounts = Array[Vector2]([Vector2(6, 10)])
hurtAudioRate = 0.1
[node name="hurt" parent="sounds" index="3"]
+1 -1
View File
@@ -39,7 +39,7 @@ radius = 27.018513
script = ExtResource("2_pb36u")
displayName = "哈士奇"
drops = Array[int]([3])
dropCounts = Array[Vector2]([Vector2(1, 3)])
dropCounts = Array[Vector2]([Vector2(1, 1)])
hurtAudioRate = 0.1
[node name="hurt" parent="sounds" index="3"]
+48
View File
@@ -0,0 +1,48 @@
[gd_scene load_steps=6 format=3 uid="uid://b5ysxff1ujv4l"]
[ext_resource type="PackedScene" uid="uid://cvogxi7mktumf" path="res://components/Abstracts/EntityBase.tscn" id="1_8og84"]
[ext_resource type="Texture2D" uid="uid://cpaafqx7vf443" path="res://resources/characters/bird/mty.png" id="2_i2hh0"]
[sub_resource type="SpriteFrames" id="SpriteFrames_hjlm2"]
animations = [{
"frames": [],
"loop": true,
"name": &"idle",
"speed": 5.0
}, {
"frames": [],
"loop": true,
"name": &"walk",
"speed": 5.0
}]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_i2hh0"]
size = Vector2(471, 57)
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_hjlm2"]
radius = 37.0
height = 126.0
[node name="MTY" instance=ExtResource("1_8og84")]
displayName = "猫头鹰"
drops = Array[int]([0, 1, 3])
dropCounts = Array[Vector2]([Vector2(2, 4), Vector2(2, 4), Vector2(1, 3)])
hurtAudioRate = 0.05
[node name="texture" parent="." index="3"]
sprite_frames = SubResource("SpriteFrames_hjlm2")
[node name="staticBackground" parent="texture" index="0"]
scale = Vector2(0.23718655, 0.23718655)
texture = ExtResource("2_i2hh0")
[node name="hitbox" parent="texture/hurtbox" index="0"]
position = Vector2(-3.5, -13.5)
shape = SubResource("RectangleShape2D_i2hh0")
[node name="hitbox2" type="CollisionShape2D" parent="texture/hurtbox" index="1"]
position = Vector2(0, -3)
shape = SubResource("CapsuleShape2D_hjlm2")
[node name="statebar" parent="." index="4"]
position = Vector2(0, -130)
+21
View File
@@ -0,0 +1,21 @@
[gd_scene load_steps=4 format=3 uid="uid://cdbmedn8pnys3"]
[ext_resource type="PackedScene" uid="uid://bykwevnv7keeh" path="res://components/Abstracts/FeedCardBase.tscn" id="1_vp4rj"]
[ext_resource type="Texture2D" uid="uid://b7vxserbhskol" path="res://resources/feeds/banana.svg" id="2_bkn40"]
[ext_resource type="Texture2D" uid="uid://dx2jadvyxxmbl" path="res://resources/feeds/diamond.png" id="2_sxbst"]
[node name="Diamond" instance=ExtResource("1_vp4rj")]
avatarTexture = ExtResource("2_sxbst")
displayName = "钻石巧克力"
topic = 2
fields = Array[int]([22])
fieldValues = Array[float]([0.15])
costs = Array[int]([0, 1])
costCounts = Array[int]([300, 250])
[node name="avatar" parent="container/info" index="0"]
texture = ExtResource("2_bkn40")
[node name="name" parent="container/info" index="1"]
displayName = "香蕉"
topic = 3
Binary file not shown.

After

Width:  |  Height:  |  Size: 983 KiB

+40
View File
@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cpaafqx7vf443"
path="res://.godot/imported/mty.png-35e99f5b820fd3ecfd8432b4a6f28277.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://resources/characters/bird/mty.png"
dest_files=["res://.godot/imported/mty.png-35e99f5b820fd3ecfd8432b4a6f28277.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
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/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
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
Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

+40
View File
@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dx2jadvyxxmbl"
path="res://.godot/imported/diamond.png-4f0009616d24ceb9a9003659a3cdb466.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://resources/feeds/diamond.png"
dest_files=["res://.godot/imported/diamond.png-4f0009616d24ceb9a9003659a3cdb466.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
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/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
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
+1 -1
View File
@@ -334,7 +334,7 @@ func tryDie(by: BulletBase = null):
var item = drops[drop]
var count = ceil(randf_range(dropCounts[drop].x, dropCounts[drop].y))
for i in range(count):
ItemDropped.generate(item, randi_range(1, int(sqrt(count) * (GameRule.difficulty - GameRule.difficultyRange.x + 1))), position + MathTool.randv2_range(GameRule.itemDroppedSpawnOffset))
ItemDropped.generate(item, randi_range(1, 2 * round(sqrt(GameRule.difficulty - GameRule.difficultyRange.x + 1))), position + MathTool.randv2_range(GameRule.itemDroppedSpawnOffset))
if MathTool.rate(
GameRule.appleDropRate +
by.launcher.fields.get(FieldStore.Entity.DROP_APPLE_RATE) +