mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-31 08:21:54 +08:00
f099242f18
实现大激光武器功能,包括攻击逻辑和属性配置 将武器卡的选择按钮重命名为更新按钮以更准确反映功能 调整武器卡描述文本居中显示并更新能量消耗数值
12 lines
407 B
GDScript
12 lines
407 B
GDScript
extends Weapon
|
|
class_name BigLaserWeapon
|
|
|
|
func update(to: int, origin: Dictionary, _entity: EntityBase):
|
|
origin["atk"] += 5 * to
|
|
origin["time"] /= 1.1
|
|
return origin
|
|
func attack(entity: EntityBase):
|
|
var weaponPos = entity.findWeaponAnchor("normal")
|
|
BulletBase.generate(preload("res://components/Bullets/BigLaser.tscn"), entity, weaponPos, (get_global_mouse_position() - weaponPos).angle())
|
|
return true
|