1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-06-05 11:17:13 +08:00

fix(子弹系统): 修复子弹分裂和折射逻辑并添加调试配置

修复子弹分裂和折射方法未返回子弹实例的问题,确保子弹能正确添加到场景中。同时在Rooster角色中添加非发布环境下的子弹分裂和折射调试配置。
This commit is contained in:
2026-01-17 12:40:58 +08:00
parent 8088723333
commit ef6e21de78
3 changed files with 11 additions and 6 deletions
+2
View File
@@ -19,6 +19,8 @@ func ai():
func split(newBullet: BulletBase, _index: int, _total: int, _lastBullet: float):
if newBullet is VectorStar:
newBullet.forwarded = false
return newBullet
func refract(newBullet: BulletBase, _entity: EntityBase, _index: int, _total: int, _lastBullet: float):
if newBullet is VectorStar:
newBullet.forwarded = false
return newBullet
+3
View File
@@ -11,6 +11,9 @@ func register():
elif bullet is FoxZhua:
EffectController.create(ComponentManager.getEffect("BloodFall"), texture.global_position).shot()
)
if !WorldManager.isRelease():
fields[FieldStore.Entity.BULLET_SPLIT] = 2
fields[FieldStore.Entity.BULLET_REFRACTION] = 2
func ai():
texture.play("walk")
var direction = Vector2(