mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-06-04 10:47:13 +08:00
fix(BulletBase): 修复子弹分裂和折射时的空引用问题
确保在子弹分裂和折射时检查返回的子弹对象是否有效,避免空引用异常
This commit is contained in:
@@ -13,6 +13,7 @@ func destroy(_beacuseMap: bool):
|
||||
func ai():
|
||||
PresetBulletAI.selfRotate(self , 5)
|
||||
hitbox.disabled = !launcher.sprinting # 玩家在冲刺时气的碰撞箱才生效
|
||||
hitbox.global_position = launcher.position
|
||||
func succeedToHit(_dmg: float, entity: EntityBase): # 当撞到敌人时
|
||||
for bullet in BulletBase.generate(
|
||||
ComponentManager.getBullet("QKSword"),
|
||||
|
||||
Reference in New Issue
Block a user