mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-29 15:31:54 +08:00
1fa8263667
移除所有子弹类中的register方法,将属性初始化移至其他位置 在BulletBase的trySplit和tryRefract方法中添加子子弹标记
19 lines
391 B
GDScript
19 lines
391 B
GDScript
extends BulletBase
|
|
|
|
@export var allColor: GradientTexture1D = null
|
|
|
|
var myColor: Color
|
|
|
|
func spawn():
|
|
myColor = allColor.gradient.sample(randf())
|
|
setColor(myColor)
|
|
|
|
func ai():
|
|
speed = (11000 - timeLived()) / 11000 * initialSpeed
|
|
rotation_degrees += speed / 10
|
|
PresetBulletAI.forward(self, rotation)
|
|
|
|
func setColor(color: Color):
|
|
texture.self_modulate = color
|
|
texture.modulate.v *= 10
|