mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-30 07:51:54 +08:00
baa4f2d725
修改HJM武器的攻击计算方式,从乘法改为加法 优化召唤物的移动速度和追踪距离 调整武器的基础属性和UI显示 增加子弹生成逻辑和伤害设置 更新武器配置和描述文本
28 lines
659 B
GDScript
28 lines
659 B
GDScript
extends SummonBase
|
|
|
|
var attackTime: float = 0
|
|
var tracer: EntityBase = null
|
|
|
|
func register():
|
|
fields[FieldStore.Entity.MAX_HEALTH] = 75
|
|
fields[FieldStore.Entity.MOVEMENT_SPEED] = 1.5
|
|
await TickTool.frame()
|
|
attackCooldownMap[0] = attackTime
|
|
func spawn():
|
|
texture.play("walk")
|
|
func ai():
|
|
tryAttack(0)
|
|
if is_instance_valid(tracer):
|
|
PresetEntityAI.follow(self, tracer, 80)
|
|
else:
|
|
tracer = EntityTool.findClosetEntity(position, get_tree(), !isPlayer(), isPlayer())
|
|
func attack(type):
|
|
if type == 0:
|
|
for bullet in BulletBase.generate(
|
|
ComponentManager.getBullet("HJMAttack"),
|
|
self,
|
|
findWeaponAnchor("normal"),
|
|
0
|
|
):
|
|
bullet.damage = atk
|