mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-06-12 14:47:13 +08:00
feat(子弹): 为魔法飞弹添加命中动画和音效
refactor(角色): 将MTY角色从猫头鹰改为狗熊宝宝并调整攻击逻辑 fix(子弹): 修复ParryBall和Parrier子弹的实例有效性检查 style(场景): 清理场景文件中的冗余属性 feat(工具): 为findClosetBulletCanDamage添加最大距离参数 chore(配置): 更新测试用的波次配置
This commit is contained in:
@@ -27,7 +27,7 @@ func spawn():
|
||||
if MathTool.rate(0.01):
|
||||
setStage(2)
|
||||
func ai():
|
||||
PresetEntityAI.follow(self, currentFocusedBoss, 250)
|
||||
PresetEntityAI.follow(self , currentFocusedBoss, 250)
|
||||
for i in len(attackCooldownMap.keys()):
|
||||
tryAttack(i)
|
||||
func enterStage(stage):
|
||||
@@ -50,7 +50,7 @@ func attack(type):
|
||||
playSound("attack0")
|
||||
for i in randi_range(20, 30):
|
||||
if !is_instance_valid(currentFocusedBoss): return false
|
||||
for bullet in BulletBase.generate(ComponentManager.getBullet("ArrowSeven"), self, findWeaponAnchor("normal"), deg_to_rad(randf_range(0, 360))):
|
||||
for bullet in BulletBase.generate(ComponentManager.getBullet("ArrowSeven"), self , findWeaponAnchor("normal"), deg_to_rad(randf_range(0, 360))):
|
||||
bullet.tracer = currentFocusedBoss
|
||||
bullet.position += MathTool.sampleInCircle(50)
|
||||
await TickTool.millseconds(50)
|
||||
@@ -59,10 +59,10 @@ func attack(type):
|
||||
await sprintTo(currentFocusedBoss.position - Vector2(MathTool.randomChoiceFrom([-300, 300]), 300), 0.25)
|
||||
var count = randi_range(6, 8)
|
||||
for i in range(count):
|
||||
BulletBase.generate(ComponentManager.getBullet("SunDance"), self, weaponPos, deg_to_rad(360.0 / count * i))
|
||||
BulletBase.generate(ComponentManager.getBullet("SunDance"), self , weaponPos, deg_to_rad(360.0 / count * i))
|
||||
elif type == 2:
|
||||
for i in range(13):
|
||||
for bullet in BulletBase.generate(ComponentManager.getBullet("ForeverRainbow"), self, weaponPos, 0):
|
||||
for bullet in BulletBase.generate(ComponentManager.getBullet("ForeverRainbow"), self , weaponPos, 0):
|
||||
bullet.rotation = 360 / 13.0 * i
|
||||
elif type == 3:
|
||||
if !is_instance_valid(currentFocusedBoss): return false
|
||||
@@ -72,7 +72,7 @@ func attack(type):
|
||||
currentInvinsible = true
|
||||
playSound("attack3")
|
||||
await TickTool.millseconds(500)
|
||||
BulletBase.generate(ComponentManager.getBullet("BearSprint"), self, weaponPos, 0)
|
||||
BulletBase.generate(ComponentManager.getBullet("BearSprint"), self , weaponPos, 0)
|
||||
await trySprint()
|
||||
sprintParticle.emitting = false
|
||||
canRunAi = true
|
||||
@@ -84,7 +84,7 @@ func attack(type):
|
||||
var count = randi_range(8, 12)
|
||||
for i in range(count):
|
||||
if !is_instance_valid(currentFocusedBoss): return false
|
||||
for bullet in BulletBase.generate(ComponentManager.getBullet("ArrowSeven"), self, findWeaponAnchor("normal"), deg_to_rad(360.0 / count * i)):
|
||||
for bullet in BulletBase.generate(ComponentManager.getBullet("ArrowSeven"), self , findWeaponAnchor("normal"), deg_to_rad(360.0 / count * i)):
|
||||
bullet.tracer = currentFocusedBoss
|
||||
await TickTool.millseconds(830.0 / count)
|
||||
return false
|
||||
@@ -93,7 +93,7 @@ func attack(type):
|
||||
var count = randi_range(20, 30)
|
||||
for i in range(count):
|
||||
if !is_instance_valid(currentFocusedBoss): return false
|
||||
for bullet in BulletBase.generate(ComponentManager.getBullet("LightGun"), self, currentFocusedBoss.position, 0):
|
||||
for bullet in BulletBase.generate(ComponentManager.getBullet("LightGun"), self , currentFocusedBoss.position, 0):
|
||||
bullet.rotation = deg_to_rad(360.0 / count * i)
|
||||
await TickTool.millseconds(1670.0 / count)
|
||||
return false
|
||||
@@ -101,7 +101,7 @@ func attack(type):
|
||||
playSound("attack6")
|
||||
for i in 16:
|
||||
if !is_instance_valid(currentFocusedBoss): return false
|
||||
for bullet in BulletBase.generate(ComponentManager.getBullet("LightGun"), self, currentFocusedBoss.position, 0):
|
||||
for bullet in BulletBase.generate(ComponentManager.getBullet("LightGun"), self , currentFocusedBoss.position, 0):
|
||||
bullet.position += MathTool.sampleInCircle(600)
|
||||
bullet.look_at(currentFocusedBoss.position + MathTool.sampleInCircle(50))
|
||||
await TickTool.millseconds(100)
|
||||
@@ -113,7 +113,7 @@ func attack(type):
|
||||
if !is_instance_valid(currentFocusedBoss): return false
|
||||
playSound("attack7")
|
||||
for i in 16:
|
||||
for bullet in BulletBase.generate(ComponentManager.getBullet("LightGun"), self, currentFocusedBoss.position, 0):
|
||||
for bullet in BulletBase.generate(ComponentManager.getBullet("LightGun"), self , currentFocusedBoss.position, 0):
|
||||
bullet.rotation_degrees += initAngle
|
||||
bullet.rotation -= angle / 2
|
||||
bullet.rotation += angle / 16 * i
|
||||
|
||||
Reference in New Issue
Block a user