mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-06-06 03:37:13 +08:00
feat(武器系统): 添加七魂武器及相关资源
添加七魂武器系统,包括: - 七魂武器脚本和场景 - 灵魂子弹脚本和场景 - 相关图片资源和音效 - 修改公鸡角色的武器配置 - 修复子弹基础类的UI状态检测问题
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
extends BulletBase
|
||||
|
||||
var colors = [
|
||||
"#2BEAFF",
|
||||
"#FCA500",
|
||||
"#0042FF",
|
||||
"#D346D0",
|
||||
"#0C9B0B",
|
||||
"#FDEB0F"
|
||||
]
|
||||
var index = 0
|
||||
|
||||
@onready var heart = $"%heart"
|
||||
|
||||
func spawn():
|
||||
heart.modulate = Color(colors[index % colors.size()])
|
||||
rotation_degrees = 360.0 / colors.size() * index
|
||||
func ai():
|
||||
rotation_degrees += 1.5
|
||||
heart.global_rotation_degrees = 0
|
||||
PresetBulletAI.lockLauncher(self, launcher, true)
|
||||
func applyDot():
|
||||
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
|
||||
@@ -0,0 +1,4 @@
|
||||
extends BulletBase
|
||||
|
||||
func ai():
|
||||
PresetBulletAI.forward(self, rotation)
|
||||
@@ -0,0 +1,10 @@
|
||||
@tool
|
||||
extends Weapon
|
||||
|
||||
func attack(entity: EntityBase):
|
||||
for i in 7:
|
||||
for j in BulletBase.generate(ComponentManager.getBullet("SevenSoul"), entity, entity.texture.global_position, 0):
|
||||
j.index = i
|
||||
func update(to, origin, _entity):
|
||||
origin["atk"] += 1 * to * soulLevel
|
||||
return origin
|
||||
Reference in New Issue
Block a user