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

feat(角色): 更新熊角色资源与攻击逻辑

添加新的熊角色贴图和遮罩资源
实现新的攻击类型7并调整现有攻击逻辑
优化动画和碰撞体设置
移除旧的SVG资源文件
This commit is contained in:
2025-09-14 13:02:00 +08:00
parent 7b89d10aca
commit 8d841b2f7b
25 changed files with 109 additions and 1352 deletions
@@ -25,6 +25,8 @@ func spawn():
await TickTool.millseconds(2500)
points.emitting = true
func setColor(color: Color):
track.material.set_shader_parameter("color", color)
var result = Color(color)
result.a = 0
track.material.set_shader_parameter("color", result)
sword.modulate = color
points.process_material.color = color
points.process_material.color = color
+19 -6
View File
@@ -13,11 +13,12 @@ func register():
attackCooldownMap[4] = 4500
attackCooldownMap[5] = 5500
attackCooldownMap[6] = 10000
sprintMultiplier = 60
attackCooldownMap[7] = 9000
sprintMultiplier = 80
func spawn():
texture.play("walk")
func ai():
PresetEntityAI.follow(self, currentFocusedBoss, 200)
PresetEntityAI.follow(self, currentFocusedBoss, 400)
for i in len(attackCooldownMap.keys()):
tryAttack(i)
func attack(type):
@@ -61,10 +62,9 @@ func attack(type):
return false
elif type == 5:
playSound("attack5")
var target = currentFocusedBoss.position
var count = randi_range(10, 15)
for i in range(count):
for bullet in BulletBase.generate(preload("res://components/Bullets/BossAttack/Bear/LightGun.tscn"), self, target, 0):
for bullet in BulletBase.generate(preload("res://components/Bullets/BossAttack/Bear/LightGun.tscn"), self, currentFocusedBoss.position, 0):
bullet.rotation = deg_to_rad(360.0 / count * i)
await TickTool.millseconds(1670.0 / count)
return false
@@ -72,10 +72,23 @@ func attack(type):
playSound("attack6")
for i in 16:
for bullet in BulletBase.generate(preload("res://components/Bullets/BossAttack/Bear/LightGun.tscn"), self, currentFocusedBoss.position, 0):
bullet.position += MathTool.randv2_range(300)
bullet.look_at(currentFocusedBoss.position)
bullet.position += MathTool.randv2_range(600)
bullet.look_at(currentFocusedBoss.position + MathTool.randv2_range(50))
await TickTool.millseconds(100)
return false
elif type == 7:
playSound("attack7")
var angle = deg_to_rad(70)
for j in 4:
var initAngle = randf_range(0, 360)
for i in 16:
for bullet in BulletBase.generate(preload("res://components/Bullets/BossAttack/Bear/LightGun.tscn"), self, currentFocusedBoss.position, 0):
bullet.rotation_degrees += initAngle
bullet.rotation -= angle / 2
bullet.rotation += angle / 16 * i
bullet.look_at(currentFocusedBoss.position)
await TickTool.millseconds(1000)
return false
return true
func sprint():
move(Vector2(sign((currentFocusedBoss.position - position).x * sprintMultiplier), 0), true)