1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-31 08:21:54 +08:00

feat(武器): 增强HXD武器效果并调整MTY角色属性

为HXD武器添加同类敌人额外暴击伤害效果,并修正反弹次数描述
调整MTY角色的攻击冷却时间并优化冲刺逻辑
This commit is contained in:
2026-02-04 22:12:35 +08:00
parent 54b9bfccf9
commit 735a140306
3 changed files with 11 additions and 5 deletions
+5
View File
@@ -3,12 +3,17 @@ class_name HXDBullet
var bouncedTime: int = 0
var maxBouncedTime: int = 0
var lastHit: EntityBase
func spawn():
texture.play(str(randi_range(0, 2)))
func ai():
PresetBulletAI.forward(self, rotation)
func succeedToHit(_dmg: float, entity: EntityBase):
if is_instance_valid(lastHit):
if lastHit.get_class() == entity.get_class():
entity.bulletHit(self, true)
lastHit = entity
if bouncedTime < maxBouncedTime:
var newEntity = EntityTool.findClosetEntity(position, get_tree(), !launcher.isPlayer(), launcher.isPlayer(), [entity])
if is_instance_valid(newEntity):