mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-06-08 20:57:13 +08:00
feat(武器系统): 新增蓝水晶武器及其子弹效果
实现蓝水晶武器系统,包含追踪子弹和环绕钻石效果 - 添加蓝水晶武器及配套子弹资源 - 实现子弹追踪逻辑和钻石环绕效果 - 扩展BulletBase类支持父子弹关联 - 更新角色预设包含新武器
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
@tool
|
||||
extends Weapon
|
||||
|
||||
func update(to: int, origin: Dictionary, _entity: EntityBase):
|
||||
origin["atk"] += 1 * to * soulLevel
|
||||
origin["count"] = 1 * soulLevel
|
||||
return origin
|
||||
func attack(entity: EntityBase):
|
||||
for i in BulletBase.generate(ComponentManager.getBullet("BlueCrystal"), entity, entity.findWeaponAnchor("normal"), deg_to_rad(randf_range(0, 360))):
|
||||
if i is BlueCrystalBullet:
|
||||
i.tracer = EntityTool.findClosetEntity(get_global_mouse_position(), get_tree(), !entity.isPlayer(), entity.isPlayer())
|
||||
i.baseDamage = readStore("atk")
|
||||
for index in readStore("count"):
|
||||
for j in BulletBase.generate(ComponentManager.getBullet("Diamond2"), entity, i.position, deg_to_rad(360.0 / readStore("count") * index)):
|
||||
if j is Diamond2Bullet:
|
||||
j.baseDamage = readStore("atk")
|
||||
j.parent = i
|
||||
@@ -0,0 +1 @@
|
||||
uid://8xlc5upq36n7
|
||||
Reference in New Issue
Block a user