mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-27 22:41:56 +08:00
fix(Statemachine): 在子弹过滤中添加实例有效性检查
确保在过滤子弹时检查实例是否有效,避免因无效实例导致的错误
This commit is contained in:
@@ -17,7 +17,7 @@ func getStateAngle(index: int):
|
||||
func forceFilter():
|
||||
bullets = bullets.filter(
|
||||
func(b):
|
||||
if b is BulletBase:
|
||||
if is_instance_valid(b) && b is BulletBase:
|
||||
return !b.destroying
|
||||
else:
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user