1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-28 06:51:54 +08:00
Files
Dog-Lynx-And-HCN/scripts/Contents/Bullets/Parrier.gd
T
fallingshrimp c5cfe236da feat(特效): 优化格挡特效并调整参数
- 新增格挡特效资源文件
- 调整格挡动画时间参数从0.8降至0.53
- 提高格挡动画播放速度从10到15
- 修改格挡特效生成位置距离从120增至150
- 更新特效颜色混合方式,使用子弹贴图颜色混合
2026-03-17 22:15:28 +08:00

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()