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