1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-28 15:01:53 +08:00
Files
Dog-Lynx-And-HCN/scripts/Contents/Bullets/ParryBall.gd
T
fallingshrimp 0395019d5f feat(武器/特效): 新增扶桑元神武器及爆炸特效
添加扶桑元神武器相关资源及功能实现,包括:
- 新增武器图标、描述和属性配置
- 实现格挡子弹并生成乾坤剑的逻辑
- 添加符咒爆炸特效及相关动画资源
- 调整乾坤剑伤害值和生成位置
- 优化武器特效控制器支持纹理动画
2026-03-21 13:51:17 +08:00

26 lines
794 B
GDScript

extends BulletBase
class_name ParryBallBullet
var cycler: CycleTimer
func spawn():
cycler = launcher.getOrCreateCycleTimer("parry")
cycler.host(self )
launcher.sprintMultiplier += 1
func destroy(_beacuseMap: bool):
launcher.sprintMultiplier -= 1
func ai():
PresetBulletAI.selfRotate(self , 5)
hitbox.disabled = !launcher.sprinting # 玩家在冲刺时气的碰撞箱才生效
func succeedToHit(_dmg: float, entity: EntityBase): # 当撞到敌人时
for bullet in BulletBase.generate(
ComponentManager.getBullet("QKSword"),
launcher,
entity.position,
0
):
if bullet is QKSwordBullet:
bullet.position = entity.texture.global_position + MathTool.sampleInRing(200, 500)
bullet.tracer = entity
bullet.look_at(entity.getTrackingAnchor()) # 生成的乾坤剑面向敌人