mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 15:01:53 +08:00
84d9eabd2b
- 将Chick的最大生命值从1000提升至2000 - 修改SevenSoul子弹的能量存储机制,移除治疗并提高能量获取 - 为SevenSoul子弹添加矩形碰撞形状 - 替换Rooster的武器配置,移除PurpleCrystal和VectorStar,添加LGBT武器
38 lines
1.1 KiB
GDScript
38 lines
1.1 KiB
GDScript
extends BulletBase
|
|
|
|
var colors = [
|
|
"#2BEAFF",
|
|
"#FCA500",
|
|
"#0042FF",
|
|
"#D346D0",
|
|
"#0C9B0B",
|
|
"#FDEB0F"
|
|
]
|
|
var index = 0
|
|
var generationDuration: float = 15000
|
|
var pingAfterGeneration: float = 5000
|
|
|
|
@onready var heart = $"%heart"
|
|
@onready var effect: GPUParticles2D = $"%effect"
|
|
|
|
func register():
|
|
area_entered.connect(
|
|
func(area):
|
|
var bullet = BulletTool.fromArea(area)
|
|
if bullet and BulletTool.canDamage(bullet, launcher):
|
|
launcher.storeEnergy(damage * 2)
|
|
)
|
|
func spawn():
|
|
modulate = Color(colors[index % colors.size()])
|
|
effect.emitting = true
|
|
|
|
func ai():
|
|
rotation_degrees = 360.0 / colors.size() * index + timeLived() / generationDuration * 360 - index / 6.0 * 360.0
|
|
heart.global_rotation_degrees = 0
|
|
PresetBulletAI.lockLauncher(self, launcher, true)
|
|
func applyDot():
|
|
if timeLived() > generationDuration * ((6.0 - index) / 6.0) + pingAfterGeneration:
|
|
BulletBase.generate(ComponentManager.getBullet("SoulBall"), launcher, heart.global_position, heart.global_position.angle_to_point(get_global_mouse_position()))
|
|
await TickTool.millseconds(100)
|
|
return true
|