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