mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 23:11:54 +08:00
5cb1e27a08
实现新的近战武器"树",包含以下内容: - 添加武器Tree.gd脚本及场景资源 - 新增Parrier子弹类型,支持子弹碰撞检测和反弹效果 - 添加武器攻击音效和子弹命中特效 - 修改BulletBase.gd以支持子弹间碰撞逻辑 - 更新角色预设装备新武器
14 lines
315 B
GDScript
14 lines
315 B
GDScript
@tool
|
|
extends Weapon
|
|
|
|
func attack(entity: EntityBase):
|
|
for bullet in BulletBase.generate(
|
|
ComponentManager.getBullet("Parrier"),
|
|
entity,
|
|
entity.findWeaponAnchor("normal"),
|
|
entity.findWeaponAnchor("normal").angle_to_point(get_global_mouse_position()),
|
|
):
|
|
if bullet is ParrierBullet:
|
|
pass
|
|
return true
|