mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-06-15 16:12:30 +08:00
feat(Bear): 添加新的攻击类型SunDance
为Bear角色添加新的攻击类型SunDance,包含子弹特效和动画。修改了Bear.gd以支持新攻击类型,并创建了SunDance.gd脚本和对应的场景文件。新攻击会生成旋转的彩色子弹,具有不同的颜色和大小变化效果。
This commit is contained in:
@@ -5,13 +5,19 @@ 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
|
||||
|
||||
Reference in New Issue
Block a user