1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-30 07:51:54 +08:00
Files
Dog-Lynx-And-HCN/scripts/Contents/Weapons/BigLaser.gd
T
fallingshrimp 8b5813fb95 refactor(武器系统): 移除武器能量消耗并调整数值显示
- 从多个武器脚本中移除needEnergy变量
- 更新武器描述中的数值变化显示
- 删除不再使用的Arrow7武器相关文件
- 为部分武器添加costBeachball属性
2025-09-20 17:36:00 +08:00

16 lines
579 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
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