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

feat(战斗系统): 添加内伤机制和爆炸类型子弹

为子弹系统添加新的爆炸类型(MotionType.EXPLOSION)
实现内伤机制,包括内伤子弹和相关逻辑
修改多个子弹场景以使用爆炸类型
调整格挡系统,增加内伤效果
更新武器描述和角色配置
This commit is contained in:
2026-05-09 19:43:44 +08:00
parent a6448813b8
commit 8b14e36031
16 changed files with 138 additions and 57 deletions
+1
View File
@@ -9,6 +9,7 @@ enum MotionType {
SPRINT, # 冲撞
BREATH, # 吐息
STAB, # 近战戳刺
EXPLOSION, # 爆炸
}
signal destroied(becauseMap: bool)
+2 -2
View File
@@ -16,7 +16,7 @@ func getStateAngle(index: int):
return lifetime() / period * deg_to_rad(360) - deg_to_rad(360.0 * index / len(bullets))
func forceFilter():
bullets = bullets.filter(is_instance_valid)
func apply():
func apply(where: Vector2):
forceFilter()
for index in len(bullets):
var bullet = bullets[index]
@@ -24,7 +24,7 @@ func apply():
var offset = Vector2.from_angle(newStateAngle)
bullet.cycleStateAngle = newStateAngle
offset.y *= 0.25
bullet.position = bullet.launcher.position + offset * distance
bullet.position = where + offset * distance
bullet.scale = Vector2.ONE * (1 + offset.y)
func host(bullet: BulletBase):
bullets.append(bullet)
+1 -1
View File
@@ -214,7 +214,7 @@ func _physics_process(_delta: float) -> void:
trailParticle.emitting = trailing
for cycler in cycleTimers.values():
if cycler is CycleTimer:
cycler.apply()
cycler.apply(position)
# 通用方法
func impluse(force: Vector2):