1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-07-09 19:42:54 +08:00

feat(人物): 更新熊角色属性和资源文件

- 将熊角色贴图从JPG格式替换为PNG格式
- 调整熊角色的攻击冷却时间和冲刺逻辑
- 修改熊角色的碰撞体积和状态条位置
- 简化测试波次配置,仅保留熊角色
- 为阶段转换添加无敌状态
- 提高小鸡角色的冲刺倍率
This commit is contained in:
2025-09-14 16:46:34 +08:00
parent ffbd45412e
commit e66a64c077
9 changed files with 29 additions and 29 deletions
+5 -11
View File
@@ -8,7 +8,7 @@
[ext_resource type="AudioStream" uid="uid://cqh2yvwcy83gg" path="res://resources/sounds/bossAttack/Bear/Sprint.ogg" id="6_x3jmu"] [ext_resource type="AudioStream" uid="uid://cqh2yvwcy83gg" path="res://resources/sounds/bossAttack/Bear/Sprint.ogg" id="6_x3jmu"]
[ext_resource type="AudioStream" uid="uid://ce8xjsh68momv" path="res://resources/sounds/bossAttack/Bear/Arrow7-2.ogg" id="7_0r2df"] [ext_resource type="AudioStream" uid="uid://ce8xjsh68momv" path="res://resources/sounds/bossAttack/Bear/Arrow7-2.ogg" id="7_0r2df"]
[ext_resource type="AudioStream" uid="uid://dd18jfva1knwm" path="res://resources/sounds/bossAttack/Bear/LightGun.ogg" id="8_qagkm"] [ext_resource type="AudioStream" uid="uid://dd18jfva1knwm" path="res://resources/sounds/bossAttack/Bear/LightGun.ogg" id="8_qagkm"]
[ext_resource type="Texture2D" uid="uid://b5e6ndswcmq48" path="res://resources/characters/bear/FurryR.jpg" id="10_m7811"] [ext_resource type="Texture2D" uid="uid://cgngjuc21l4xq" path="res://resources/characters/bear/FurryR.png" id="9_av1u2"]
[ext_resource type="Shader" path="res://shaders/RedTemprature.gdshader" id="12_j8sas"] [ext_resource type="Shader" path="res://shaders/RedTemprature.gdshader" id="12_j8sas"]
[ext_resource type="Texture2D" uid="uid://df6ly7iydtcwx" path="res://resources/characters/bear/FurryR-mask.png" id="13_v2sdb"] [ext_resource type="Texture2D" uid="uid://df6ly7iydtcwx" path="res://resources/characters/bear/FurryR-mask.png" id="13_v2sdb"]
@@ -16,7 +16,7 @@
animations = [{ animations = [{
"frames": [{ "frames": [{
"duration": 1.0, "duration": 1.0,
"texture": ExtResource("10_m7811") "texture": ExtResource("9_av1u2")
}], }],
"loop": true, "loop": true,
"name": &"idle", "name": &"idle",
@@ -24,7 +24,7 @@ animations = [{
}, { }, {
"frames": [{ "frames": [{
"duration": 1.0, "duration": 1.0,
"texture": ExtResource("10_m7811") "texture": ExtResource("9_av1u2")
}], }],
"loop": true, "loop": true,
"name": &"walk", "name": &"walk",
@@ -32,7 +32,7 @@ animations = [{
}] }]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_akdh6"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_akdh6"]
size = Vector2(335, 344) size = Vector2(100, 100)
[sub_resource type="Animation" id="Animation_sxh2u"] [sub_resource type="Animation" id="Animation_sxh2u"]
length = 0.001 length = 0.001
@@ -167,14 +167,9 @@ stream = ExtResource("8_qagkm")
stream = ExtResource("8_qagkm") stream = ExtResource("8_qagkm")
[node name="texture" parent="." index="2"] [node name="texture" parent="." index="2"]
position = Vector2(0, -80)
sprite_frames = SubResource("SpriteFrames_6tgxs") sprite_frames = SubResource("SpriteFrames_6tgxs")
[node name="hurtbox" parent="texture" index="0"]
visible = false
[node name="hitbox" parent="texture/hurtbox" index="0"] [node name="hitbox" parent="texture/hurtbox" index="0"]
position = Vector2(-2.5, -1)
shape = SubResource("RectangleShape2D_akdh6") shape = SubResource("RectangleShape2D_akdh6")
[node name="animator" parent="texture" index="1"] [node name="animator" parent="texture" index="1"]
@@ -194,12 +189,11 @@ texture = ExtResource("13_v2sdb")
[node name="mask" type="Sprite2D" parent="texture" index="7"] [node name="mask" type="Sprite2D" parent="texture" index="7"]
unique_name_in_owner = true unique_name_in_owner = true
visible = false
material = SubResource("ShaderMaterial_6h05p") material = SubResource("ShaderMaterial_6h05p")
texture = ExtResource("13_v2sdb") texture = ExtResource("13_v2sdb")
[node name="statebar" parent="." index="3"] [node name="statebar" parent="." index="3"]
position = Vector2(0, -284) position = Vector2(0, -114)
[node name="movebox" parent="." index="4"] [node name="movebox" parent="." index="4"]
disabled = true disabled = true
Binary file not shown.

Before

Width:  |  Height:  |  Size: 163 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

@@ -2,16 +2,16 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://b5e6ndswcmq48" uid="uid://cgngjuc21l4xq"
path="res://.godot/imported/FurryR.jpg-f305957108e2f1f86811a398be97c85f.ctex" path="res://.godot/imported/FurryR.png-5850392cbd69fd4762536751d27e9e17.ctex"
metadata={ metadata={
"vram_texture": false "vram_texture": false
} }
[deps] [deps]
source_file="res://resources/characters/bear/FurryR.jpg" source_file="res://resources/characters/bear/FurryR.png"
dest_files=["res://.godot/imported/FurryR.jpg-f305957108e2f1f86811a398be97c85f.ctex"] dest_files=["res://.godot/imported/FurryR.png-5850392cbd69fd4762536751d27e9e17.ctex"]
[params] [params]
+10 -5
View File
@@ -11,12 +11,11 @@ func register():
attackCooldownMap[0] = 3000 attackCooldownMap[0] = 3000
attackCooldownMap[1] = 10000 attackCooldownMap[1] = 10000
attackCooldownMap[2] = 8000 attackCooldownMap[2] = 8000
attackCooldownMap[3] = 13000 attackCooldownMap[3] = 5000
attackCooldownMap[4] = 4500 attackCooldownMap[4] = 4500
attackCooldownMap[5] = 5500 attackCooldownMap[5] = 5500
attackCooldownMap[6] = 10000 attackCooldownMap[6] = 10000
attackCooldownMap[7] = 9000 attackCooldownMap[7] = 9000
sprintMultiplier = 60
healthChanged.connect( healthChanged.connect(
func(newHealth): func(newHealth):
setStage(1 if newHealth < fields[FieldStore.Entity.MAX_HEALTH] * 0.5 else 0) setStage(1 if newHealth < fields[FieldStore.Entity.MAX_HEALTH] * 0.5 else 0)
@@ -56,15 +55,17 @@ func attack(type):
elif type == 3: elif type == 3:
if !is_instance_valid(currentFocusedBoss): return false if !is_instance_valid(currentFocusedBoss): return false
await sprintTo(currentFocusedBoss.position - Vector2(MathTool.randc_from([500, -500]), 0), 0.25) await sprintTo(currentFocusedBoss.position - Vector2(MathTool.randc_from([500, -500]), 0), 0.25)
playSound("attack3")
sprintParticle.emitting = true sprintParticle.emitting = true
canRunAi = false canRunAi = false
await TickTool.millseconds(900) currentInvinsible = true
playSound("attack3")
await TickTool.millseconds(500)
BulletBase.generate(preload("res://components/Bullets/BearSprint.tscn"), self, weaponPos, 0) BulletBase.generate(preload("res://components/Bullets/BearSprint.tscn"), self, weaponPos, 0)
await trySprint() await trySprint()
sprintParticle.emitting = false sprintParticle.emitting = false
canRunAi = true canRunAi = true
await sprintTo(currentFocusedBoss.position + MathTool.randv2_range(400), 0.25) await sprintTo(currentFocusedBoss.position + MathTool.randv2_range(400), 0.25)
currentInvinsible = false
return false return false
elif type == 4: elif type == 4:
playSound("attack4") playSound("attack4")
@@ -109,4 +110,8 @@ func attack(type):
return false return false
return true return true
func sprint(): func sprint():
move((currentFocusedBoss.position - position).normalized() * Vector2(1, 0) * sprintMultiplier, true) var dir = sign((currentFocusedBoss.position - position).x)
velocity = Vector2(dir, 0)
func sprintAi():
velocity.x *= 1.2
return abs(velocity.x) >= 1000000
+1 -1
View File
@@ -12,7 +12,7 @@ func register():
attackCooldownMap[1] = 6000 attackCooldownMap[1] = 6000
attackCooldownMap[2] = 2000 attackCooldownMap[2] = 2000
attackCooldownMap[3] = 500 attackCooldownMap[3] = 500
sprintMultiplier = 30 sprintMultiplier = 45
func spawn(): func spawn():
texture.play("walk") texture.play("walk")
+7 -8
View File
@@ -15,18 +15,17 @@ static var WAVE_NORMAL = [
Wave.create(preload("res://components/Characters/Bear.tscn"), 0, 0, true, 19, INF, 10), Wave.create(preload("res://components/Characters/Bear.tscn"), 0, 0, true, 19, INF, 10),
] ]
static var WAVE_TESTBOSS = [ static var WAVE_TESTBOSS = [
Wave.create(preload("res://components/Characters/Chick.tscn"), 0, 0, true, 0, INF, 1),
Wave.create(preload("res://components/Characters/Bear.tscn"), 0, 0, true, 0, INF, 1), Wave.create(preload("res://components/Characters/Bear.tscn"), 0, 0, true, 0, INF, 1),
Wave.create(preload("res://components/Characters/KukeMC.tscn"), 0, 0, true, 0, INF, 1),
] ]
static var data = [] static var data = WAVE_TESTBOSS
static func customStart(): static func customStart():
var furryr = EntityBase.generate(preload("res://components/Characters/Bear.tscn"), MathTool.randv2_range(500), true, false) pass
var kukemc = EntityBase.generate(preload("res://components/Characters/KukeMC.tscn"), MathTool.randv2_range(500), true, false) # var furryr = EntityBase.generate(preload("res://components/Characters/Bear.tscn"), MathTool.randv2_range(500), true, false)
EntityBase.generate(preload("res://components/Characters/Chick.tscn"), MathTool.randv2_range(500), true, false) # var kukemc = EntityBase.generate(preload("res://components/Characters/KukeMC.tscn"), MathTool.randv2_range(500), true, false)
furryr.currentFocusedBoss = kukemc # EntityBase.generate(preload("res://components/Characters/Chick.tscn"), MathTool.randv2_range(500), true, false)
kukemc.currentFocusedBoss = furryr # furryr.currentFocusedBoss = kukemc
# kukemc.currentFocusedBoss = furryr
static func create( static func create(
entity_: PackedScene, entity_: PackedScene,
minCount_: int = 1, minCount_: int = 1,
+2
View File
@@ -175,6 +175,7 @@ func timeLived():
func setStage(stage: int): func setStage(stage: int):
if currentStage == stage: if currentStage == stage:
return return
currentInvinsible = true
canRunAi = false canRunAi = false
var oldStage = currentStage var oldStage = currentStage
currentStage = stage currentStage = stage
@@ -185,6 +186,7 @@ func setStage(stage: int):
stageAnimator.play("enter") stageAnimator.play("enter")
await stageAnimator.animation_finished await stageAnimator.animation_finished
canRunAi = true canRunAi = true
currentInvinsible = false
func applyLevel(): func applyLevel():
fields[FieldStore.Entity.MAX_HEALTH] *= (1 + GameRule.entityHealthIncreasePerWave * (GameRule.difficulty + 1)) ** level fields[FieldStore.Entity.MAX_HEALTH] *= (1 + GameRule.entityHealthIncreasePerWave * (GameRule.difficulty + 1)) ** level
fields[FieldStore.Entity.DAMAGE_MULTIPILER] *= (1 + GameRule.entityDamageIncreasePerWave * (GameRule.difficulty + 1)) ** level fields[FieldStore.Entity.DAMAGE_MULTIPILER] *= (1 + GameRule.entityDamageIncreasePerWave * (GameRule.difficulty + 1)) ** level