mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-06-05 19:27:15 +08:00
fix(BulletBase): 修复子弹分裂和折射时的空引用问题
确保在子弹分裂和折射时检查返回的子弹对象是否有效,避免空引用异常
This commit is contained in:
@@ -39,3 +39,7 @@ func hitBullet(bullet: BulletBase): # 当前子弹与其他子弹相撞
|
||||
):
|
||||
if b is ParryBallBullet:
|
||||
b.atk = atk * bullet.baseDamage
|
||||
func refract(_newBullet: BulletBase, _entity: EntityBase, _index: int, _total: int, _lastBullet: float):
|
||||
return null
|
||||
func split(_newBullet: BulletBase, _index: int, _total: int, _lastBullet: float):
|
||||
return null
|
||||
|
||||
Reference in New Issue
Block a user