1
1
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:
2026-05-10 22:51:03 +08:00
parent 2ebcdbee25
commit f5f63ee602
+1 -1
View File
@@ -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