mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 06:51:54 +08:00
5250adc50d
添加蛋挞、香辣鸡腿堡、阴阳球和钓鱼竿等新食物资源 调整Bow武器的攻击力和自身伤害计算逻辑 修改Tree武器的攻击速率和伤害比例 更新BigLaser和Tree的显示名称及配置 添加相关纹理资源及导入配置
22 lines
585 B
GDScript
22 lines
585 B
GDScript
@tool
|
|
extends Weapon
|
|
|
|
func update(to: int, origin: Dictionary, _entity: EntityBase):
|
|
origin["atk"] += 0.1 * to * soulLevel
|
|
origin["count"] = 1 * soulLevel
|
|
origin["self"] *= soulLevel
|
|
return origin
|
|
func attack(entity: EntityBase):
|
|
entity.takeDamage(readStore("self"))
|
|
var weaponPos = entity.findWeaponAnchor("normal")
|
|
for i in BulletBase.generate(
|
|
ComponentManager.getBullet("Bow"),
|
|
entity,
|
|
weaponPos,
|
|
weaponPos.angle_to_point(get_global_mouse_position())
|
|
):
|
|
var bullet: Bow = i
|
|
bullet.count = readStore("count")
|
|
bullet.atk = readStore("atk")
|
|
return true
|