mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-06-02 17:31:55 +08:00
feat(角色): 添加熊boss的新攻击方式和音效
添加熊boss的四种攻击方式: 1. 箭雨攻击(ArrowSeven) 2. 太阳舞攻击(SunDance) 3. 永恒彩虹攻击(ForeverRainbow) 4. 冲刺攻击(BearSprint) 新增对应攻击音效资源 调整子弹追踪和伤害计算逻辑 添加冲刺粒子特效
This commit is contained in:
@@ -27,10 +27,10 @@ func ai():
|
||||
if timeLived() <= forwardTime:
|
||||
speed = 10 * ((forwardTime - timeLived()) / forwardTime)
|
||||
elif forwarded:
|
||||
if timeLived() < forwardTime + 1000:
|
||||
if timeLived() < forwardTime + 2000:
|
||||
speed = clamp((timeLived() - forwardTime) / 75, 0, 30)
|
||||
if is_instance_valid(tracer):
|
||||
PresetBulletAI.trace(self, tracer.position, 0.1)
|
||||
PresetBulletAI.trace(self, tracer.position, 0.03)
|
||||
else:
|
||||
forwarded = true
|
||||
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
extends BulletBase
|
||||
|
||||
@export var allColor: GradientTexture1D = null
|
||||
|
||||
var myColor: Color
|
||||
|
||||
func register():
|
||||
damage = 5
|
||||
penerate = 1
|
||||
func spawn():
|
||||
myColor = allColor.gradient.sample(randf())
|
||||
setColor(myColor)
|
||||
|
||||
func ai():
|
||||
speed = (11000 - timeLived()) / 11000 * initialSpeed
|
||||
rotation_degrees += speed / 10
|
||||
PresetBulletAI.forward(self, rotation)
|
||||
|
||||
func setColor(color: Color):
|
||||
texture.modulate = color
|
||||
@@ -5,10 +5,10 @@ func register():
|
||||
speed = 0
|
||||
penerate = 1
|
||||
func ai():
|
||||
damage = launcher.velocity.length()
|
||||
damage = launcher.velocity.length() / 300
|
||||
PresetBulletAI.lockLauncher(self, launcher, true)
|
||||
if !launcher.sprinting:
|
||||
tryDestroy()
|
||||
func destroy(beacuseMap: bool):
|
||||
if beacuseMap:
|
||||
launcher.takeDamage(self, 0.5)
|
||||
launcher.takeDamage(self, MathTool.rate(0.5))
|
||||
|
||||
Reference in New Issue
Block a user