1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-06-02 01:11:54 +08:00

feat(子弹): 为魔法飞弹添加命中动画和音效

refactor(角色): 将MTY角色从猫头鹰改为狗熊宝宝并调整攻击逻辑

fix(子弹): 修复ParryBall和Parrier子弹的实例有效性检查

style(场景): 清理场景文件中的冗余属性

feat(工具): 为findClosetBulletCanDamage添加最大距离参数

chore(配置): 更新测试用的波次配置
This commit is contained in:
2026-04-24 18:09:24 +08:00
parent f27d75befd
commit 3a8c48dae7
12 changed files with 161 additions and 60 deletions
+1 -1
View File
@@ -17,7 +17,6 @@ func ai():
speedV2 *= 0.995
speed = speedV2.length()
PresetBulletAI.forward(self , speedV2.angle())
texture.rotation += deg_to_rad(sqrt(speed))
func succeedToHit(_dmg: float, entity: EntityBase):
if !accelerating:
@@ -38,3 +37,4 @@ func succeedToHit(_dmg: float, entity: EntityBase):
bullet.baseDamage = baseDamage
roundBullets.append(bullet)
powerScale = 0
animator.play("hit")
+3 -2
View File
@@ -6,8 +6,8 @@ class_name ParrierBullet
var parryiedTimes: int = 0
var maxParryTimes: int = 1
var maxBallCount: int = 3
var atk: float = 0
var reflectRate: float = 0.25
var atk: float = 1
var reflectRate: float = 0.3
func spawn():
var varians = randi_range(0, 1)
@@ -29,6 +29,7 @@ func succeedToHit(_dmg: float, entity: EntityBase):
eff.shot()
entity.impluse((effSpawn - position).normalized() * 450)
func hitBullet(bullet: BulletBase): # 当前子弹与其他子弹相撞
if !is_instance_valid(bullet.launcher): return
if BulletTool.canDamage(bullet, launcher): # 其他子弹可以使当前子弹的发射者受伤吗?
if parryiedTimes < maxParryTimes && MathTool.rate(parryRate): # 一个刀光最多格挡多少个敌方子弹?
parryiedTimes += 1
+3 -2
View File
@@ -2,14 +2,15 @@ extends BulletBase
class_name ParryBallBullet
var cycler: CycleTimer
var atk: float = 0
var atk: float = 1
func spawn():
cycler = launcher.getOrCreateCycleTimer("parry")
cycler.host(self )
launcher.sprintMultiplier += 1
func destroy(_beacuseMap: bool):
launcher.sprintMultiplier -= 1
if is_instance_valid(launcher):
launcher.sprintMultiplier -= 1
func ai():
PresetBulletAI.selfRotate(self , 5)
hitbox.disabled = !launcher.sprinting # 玩家在冲刺时气的碰撞箱才生效