1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-31 08:21:54 +08:00
Files
Dog-Lynx-And-HCN/scripts/Contents/Weapons/PurpleCrystal.gd
T
fallingshrimp debb450044 refactor(武器系统): 重构武器冷却和攻击逻辑
- 将CooldownTimer的startCooldown方法重命名为更简洁的start
- 为EntityBase添加weaponStore节点管理武器
- 修改武器攻击逻辑,现在由Weapon类自身处理冷却和攻击
- 调整武器卡片的UI布局和描述居中显示
- 为Rooster角色添加预设武器
2025-09-06 07:40:21 +08:00

12 lines
410 B
GDScript

extends Weapon
class_name PurpleCrystalWeapon
func update(to: int, origin: Dictionary, _entity: EntityBase):
origin["atk"] += 5 * to
return origin
func attack(entity: EntityBase):
var weaponPos = entity.findWeaponAnchor("normal")
BulletBase.generate(preload("res://components/Bullets/PurpleCrystal.tscn"), entity, weaponPos, (get_global_mouse_position() - weaponPos).angle())
print("test2")
return true