mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 06:51:54 +08:00
c5cfe236da
- 新增格挡特效资源文件 - 调整格挡动画时间参数从0.8降至0.53 - 提高格挡动画播放速度从10到15 - 修改格挡特效生成位置距离从120增至150 - 更新特效颜色混合方式,使用子弹贴图颜色混合
13 lines
426 B
GDScript
13 lines
426 B
GDScript
extends BulletBase
|
|
class_name ParrierBullet
|
|
|
|
@export var parryRate: float = 1
|
|
|
|
func hitBullet(bullet: BulletBase):
|
|
if BulletTool.canDamage(bullet, launcher):
|
|
if MathTool.rate(parryRate):
|
|
var eff = EffectController.create(ComponentManager.getEffect("Parry"), position + (bullet.position - position).normalized() * 150)
|
|
eff.modulate = bullet.modulate.blend(bullet.texture.modulate)
|
|
eff.shot()
|
|
bullet.tryDestroy()
|