mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 06:51:54 +08:00
feat(子弹系统): 添加QKSword子弹及其处理逻辑
实现QKSword子弹类型,包括子弹行为、生成逻辑和命中效果 - 新增QKSwordBullet类,实现追踪目标功能 - 新增QKSwordHandler处理命中后的子弹生成 - 修改ParryBall使其命中时生成QKSword子弹 - 调整CycleTimer的子弹偏移计算 - 为BulletBase添加afterSpawn回调
This commit is contained in:
@@ -71,6 +71,7 @@ func _ready():
|
||||
if autoSpawnAnimation:
|
||||
animator.play("spawn")
|
||||
await animator.animation_finished
|
||||
afterSpawn()
|
||||
if freeAfterSpawn:
|
||||
tryDestroy()
|
||||
func _process(_delta: float) -> void:
|
||||
@@ -214,6 +215,8 @@ func destroy(_beacuseMap: bool):
|
||||
pass
|
||||
func spawn():
|
||||
pass
|
||||
func afterSpawn():
|
||||
pass
|
||||
func applyDot():
|
||||
pass
|
||||
func succeedToHit(_dmg: float, _entity: EntityBase):
|
||||
|
||||
@@ -19,7 +19,7 @@ func apply():
|
||||
for index in len(bullets):
|
||||
var bullet = bullets[index]
|
||||
var offset = Vector2.from_angle(periodPercent(index))
|
||||
offset.y *= 0.5
|
||||
offset.y *= 0.25
|
||||
bullet.position = bullet.launcher.position + offset * distance
|
||||
bullet.scale = Vector2.ONE * (1 + offset.y)
|
||||
func host(bullet: BulletBase):
|
||||
|
||||
Reference in New Issue
Block a user