mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 06:51:54 +08:00
fb0b98c96e
添加红水晶武器系统,包括武器、子弹、特效和音效资源 - 新增红水晶武器脚本及场景,实现爆炸伤害功能 - 添加红水晶子弹逻辑,支持半径爆炸效果 - 加入红水晶爆炸特效和音效 - 更新角色武器库包含红水晶武器 - 调整现有水晶武器描述和数值 - 扩展子弹基类支持首帧回调 - 更新特效控制器支持音效播放等待
16 lines
562 B
GDScript
16 lines
562 B
GDScript
@tool
|
|
extends Weapon
|
|
class_name RedCrystalWeapon
|
|
|
|
func update(to: int, origin: Dictionary, _entity: EntityBase):
|
|
origin["atk"] += 2 * to * soulLevel
|
|
origin["radius"] += 4 * to * soulLevel
|
|
return origin
|
|
func attack(entity: EntityBase):
|
|
var weaponPos = entity.findWeaponAnchor("normal")
|
|
for bullet in BulletBase.generate(ComponentManager.getBullet("RedCrystal"), entity, weaponPos, (get_global_mouse_position() - weaponPos).angle()):
|
|
if bullet is RedCrystalBullet:
|
|
bullet.baseDamage = readStore("atk")
|
|
bullet.radius = readStore("radius")
|
|
return true
|