mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 06:51:54 +08:00
feat(子弹): 为VectorStar添加分裂逻辑并重构ArrowSeven
为VectorStar子弹添加分裂时的特殊处理逻辑,确保分裂出的新子弹不会被标记为forwarded 将ArrowSeven子弹重命名为ArrowSevenBullet以明确类名,并移除多余空行
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
extends BulletBase
|
||||
class_name ArrowSevenBullet
|
||||
|
||||
@export var allColor: GradientTexture1D = null
|
||||
|
||||
@@ -16,8 +17,6 @@ func spawn():
|
||||
superlight.material = superlight.material.duplicate()
|
||||
trail.process_material = trail.process_material.duplicate()
|
||||
setColor(myColor)
|
||||
|
||||
|
||||
func ai():
|
||||
superlight.global_rotation_degrees = 90
|
||||
PresetBulletAI.forward(self, rotation)
|
||||
@@ -31,7 +30,6 @@ func ai():
|
||||
else:
|
||||
forwarded = true
|
||||
|
||||
|
||||
func setColor(color: Color):
|
||||
texture.self_modulate = color
|
||||
var mat: ParticleProcessMaterial = trail.process_material
|
||||
|
||||
@@ -16,3 +16,6 @@ func ai():
|
||||
speed = (timeLived() - forwardTime) / 30
|
||||
if is_instance_valid(tracer):
|
||||
rotation = position.angle_to_point(tracer.getTrackingAnchor())
|
||||
func split(newBullet: BulletBase, _index: int, _total: int, _lastBullet: float):
|
||||
if newBullet is VectorStar:
|
||||
newBullet.forwarded = false
|
||||
|
||||
Reference in New Issue
Block a user