mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-31 08:21:54 +08:00
5300144d96
- 修改彩虹子弹的着色器参数和颜色处理 - 更新光枪的着色器和材质参数 - 调整熊角色攻击时的子弹数量 - 优化粒子效果和材质设置
22 lines
434 B
GDScript
22 lines
434 B
GDScript
extends BulletBase
|
|
|
|
@export var allColor: GradientTexture1D = null
|
|
|
|
var myColor: Color
|
|
|
|
func register():
|
|
damage = 5
|
|
penerate = 1
|
|
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
|