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

feat(角色): 增强KukeMC角色属性和攻击模式

- 增加KukeMC的最大生命值和移动速度
- 调整攻击冷却时间和射击偏移量
- 实现跟随BOSS的AI行为
- 修改紫水晶子弹的生成数量和位置
- 为武器节点添加normal锚点
This commit is contained in:
2025-09-14 14:10:07 +08:00
parent 8a1a2c54ee
commit e77a5806d0
3 changed files with 11 additions and 6 deletions
+2 -2
View File
@@ -19,12 +19,12 @@ animations = [{
[node name="PurpleCrystal" instance=ExtResource("1_45mh7")]
script = ExtResource("2_4lnlm")
displayName = "紫水晶"
lifeDistance = 700.0
[node name="texture" parent="." index="0"]
position = Vector2(22, 0)
sprite_frames = SubResource("SpriteFrames_r86b3")
[node name="hitbox" parent="." index="1"]
position = Vector2(36, 0)
position = Vector2(-33, 0)
shape = SubResource("CircleShape2D_ty1as")
+2
View File
@@ -37,5 +37,7 @@ animation = &"walk"
[node name="hitbox" parent="texture/hurtbox" index="0"]
shape = SubResource("RectangleShape2D_farlp")
[node name="normal" type="Node2D" parent="texture/weapons" index="0"]
[node name="statebar" parent="." index="3"]
position = Vector2(0, -140)
+7 -4
View File
@@ -1,10 +1,12 @@
extends EntityBase
class_name KukeMC
func register():
fields[FieldStore.Entity.MAX_HEALTH] = 1000
fields[FieldStore.Entity.OFFSET_SHOOT] = 45
attackCooldownMap[0] = 500
fields[FieldStore.Entity.MAX_HEALTH] = 2500
fields[FieldStore.Entity.OFFSET_SHOOT] = 15
fields[FieldStore.Entity.MOVEMENT_SPEED] = 0.5
attackCooldownMap[0] = 2000
func ai():
PresetEntityAI.follow(self, currentFocusedBoss, 500)
for bullet in get_tree().get_nodes_in_group("bullets"):
if (
bullet is LGBTBullet and
@@ -14,5 +16,6 @@ func ai():
tryAttack(0)
func attack(type):
if type == 0:
for i in randi_range(3, 8):
for i in randi_range(8, 16):
BulletBase.generate(preload("res://components/Bullets/PurpleCrystal.tscn"), self, findWeaponAnchor("normal"), position.angle_to_point(currentFocusedBoss.position))
await TickTool.millseconds(randi_range(10, 50))