mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-29 23:41:54 +08:00
007f323482
移除全局武器升级能量消耗倍数,改为各武器独立设置升级能量消耗 调整矢量核心武器的属性计算和初始能量值 为所有武器类型添加升级时的能量消耗增量
17 lines
596 B
GDScript
17 lines
596 B
GDScript
@tool
|
|
extends Weapon
|
|
class_name BigLaserWeapon
|
|
|
|
func update(to: int, origin: Dictionary, _entity: EntityBase):
|
|
origin["atk"] += 5 * to * soulLevel
|
|
origin["time"] /= 1 + 0.05 * to * soulLevel
|
|
needEnergy += 5
|
|
return origin
|
|
func attack(entity: EntityBase):
|
|
var weaponPos = entity.findWeaponAnchor("normal")
|
|
for bullet in BulletBase.generate(preload("res://components/Bullets/BigLaser.tscn"), entity, weaponPos, (get_global_mouse_position() - weaponPos).angle()):
|
|
var bigLaser: BigLaser = bullet
|
|
bigLaser.dotTime = readStore("time") * 1000
|
|
bigLaser.damage = readStore("atk")
|
|
return true
|