mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-29 07:21:54 +08:00
53db80ceb7
重构链式机枪的子弹生成逻辑,降低散射衰减系数 添加射击音效资源及导入配置 调整武器属性描述和数值 移除测试用的调试代码
27 lines
937 B
GDScript
27 lines
937 B
GDScript
@tool
|
|
extends Weapon
|
|
|
|
func update(to: int, origin: Dictionary, _entity: EntityBase):
|
|
origin["rotate"] += 0.005 * to * soulLevel
|
|
origin["dmg1"] += 0.03 * to * soulLevel
|
|
origin["dmg2"] += 0.03 * to * soulLevel
|
|
origin["dmg3"] += 0.03 * to * soulLevel
|
|
origin["dmg4"] += 0.03 * to * soulLevel
|
|
origin["dmg5"] += 0.025 * to * soulLevel
|
|
origin["count"] = 1 * soulLevel
|
|
origin["atk"] += 3 * to * soulLevel
|
|
return origin
|
|
func attack(entity: EntityBase):
|
|
for j in BulletBase.generate(
|
|
ComponentManager.getBullet("Volcano"),
|
|
entity,
|
|
entity.findWeaponAnchor("normal"),
|
|
entity.position.angle_to_point(entity.get_global_mouse_position()), true, true
|
|
):
|
|
var bullet: Volcano = j
|
|
bullet.baseDamage = readStore("atk")
|
|
bullet.rotates = readStore("rotate")
|
|
bullet.damageMultipliers = [readStore("dmg1"), readStore("dmg2"), readStore("dmg3"), readStore("dmg4")]
|
|
bullet.count = readStore("count")
|
|
bullet.dmg5 = readStore("dmg5")
|