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/Arrow7.gd
T
fallingshrimp 94589131fa feat(武器系统): 添加七彩矢武器及其相关资源
添加新的七彩矢武器系统,包括武器脚本、子弹特效、着色器和动画资源
为Rooster角色添加新武器选项
实现光效追踪和颜色渐变效果
调整窗口模式为2(全屏)
2025-09-07 09:25:51 +08:00

16 lines
593 B
GDScript

@tool
extends Weapon
class_name Arrow7Weapon
func update(to: int, origin: Dictionary, _entity: EntityBase):
origin["atk"] += 5 * to
origin["count"] += 1 * to
return origin
func attack(entity: EntityBase):
var weaponPos = entity.findWeaponAnchor("normal")
for i in range(readStore("count")):
for bullet in BulletBase.generate(preload("res://components/Bullets/BossAttack/Bear/ArrowSeven.tscn"), entity, weaponPos, deg_to_rad(randf_range(0, 360))):
bullet.damage = readStore("atk")
bullet.tracer = EntityTool.findClosetEntity(entity.position, get_tree(), false, true)
return true