1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-27 22:41:56 +08:00
Files
Dog-Lynx-And-HCN/scripts/Contents/Weapons/BigLaser.gd
T
fallingshrimp 19e7d7691d refactor(武器系统): 调整武器数值显示格式和数据结构
统一武器数值显示格式,将浮点数显示为整数或保留两位小数。修改storeType从数组改为字典结构以提高可读性。调整部分武器参数平衡性,包括BigLaser的时间系数和LGBTWeapon的power增量。移除VectorStarWeapon的mincount升级逻辑。为所有武器组件添加debugRebuild标志和默认500点costBeachball值。在FieldShow.gd中新增INTEGER数据类型处理。更新武器描述模板中的数值格式化逻辑。
2025-09-06 16:11:59 +08:00

16 lines
546 B
GDScript

@tool
extends Weapon
class_name BigLaserWeapon
func update(to: int, origin: Dictionary, _entity: EntityBase):
origin["atk"] += 5 * to
origin["time"] /= 1.05
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