1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-28 06:51:54 +08:00
Files
fallingshrimp cc4b91797d feat(子弹系统): 添加QKSword子弹及其处理逻辑
实现QKSword子弹类型,包括子弹行为、生成逻辑和命中效果
- 新增QKSwordBullet类,实现追踪目标功能
- 新增QKSwordHandler处理命中后的子弹生成
- 修改ParryBall使其命中时生成QKSword子弹
- 调整CycleTimer的子弹偏移计算
- 为BulletBase添加afterSpawn回调
2026-03-18 22:39:44 +08:00

15 lines
390 B
GDScript

extends BulletBase
class_name QKSwordHandler
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(50, 200)
bullet.tracer = entity
bullet.look_at(entity.position)