1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-28 15:01:53 +08:00
Files
Dog-Lynx-And-HCN/scripts/Contents/Characters/Bear.gd
T
fallingshrimp 9ad45c683f feat(Bear): 添加新的攻击类型SunDance
为Bear角色添加新的攻击类型SunDance,包含子弹特效和动画。修改了Bear.gd以支持新攻击类型,并创建了SunDance.gd脚本和对应的场景文件。新攻击会生成旋转的彩色子弹,具有不同的颜色和大小变化效果。
2025-09-07 11:17:44 +08:00

24 lines
852 B
GDScript

extends EntityBase
class_name Bear # 攻击方式模仿泰拉瑞亚光之女皇
func register():
fields[FieldStore.Entity.MAX_HEALTH] = 2000
fields[FieldStore.Entity.MOVEMENT_SPEED] = 0.25
attackCooldownMap[0] = 100
attackCooldownMap[1] = 100
func spawn():
texture.play("walk")
func ai():
PresetEntityAI.follow(self, currentFocusedBoss, 0)
tryAttack(0)
tryAttack(1)
func attack(type):
var weaponPos = findWeaponAnchor("normal")
if type == 0:
for bullet in BulletBase.generate(preload("res://components/Bullets/BossAttack/Bear/ArrowSeven.tscn"), self, weaponPos, deg_to_rad(randf_range(0, 360))):
bullet.tracer = currentFocusedBoss
elif type == 1:
for bullet in BulletBase.generate(preload("res://components/Bullets/BossAttack/Bear/SunDance.tscn"), self, weaponPos, deg_to_rad(randf_range(0, 360))):
bullet.damage = 1
return true