diff --git a/scripts/Contents/Bullets/Parrier.gd b/scripts/Contents/Bullets/Parrier.gd index 11f4920..da17866 100644 --- a/scripts/Contents/Bullets/Parrier.gd +++ b/scripts/Contents/Bullets/Parrier.gd @@ -54,6 +54,9 @@ func hitBullet(bullet: BulletBase): # 当前子弹与其他子弹相撞 bullet.tryDestroy() elif bullet.motionType == BulletBase.MotionType.SWING: bullet.hitbox.disabled = true + elif bullet.motionType == BulletBase.MotionType.SPRINT: + bullet.tryDestroy() + bullet.launcher.velocity *= -0.1 elif bullet.motionType == BulletBase.MotionType.SUMMON || bullet.motionType == BulletBase.MotionType.MAGIC: launcher.storeEnergy(sqrt(bullet.baseDamage)) var cycler = launcher.getOrCreateCycleTimer("parry", 2000, 100) diff --git a/scripts/Statemachine/BulletBase.gd b/scripts/Statemachine/BulletBase.gd index e85cbfc..9fb7d32 100644 --- a/scripts/Statemachine/BulletBase.gd +++ b/scripts/Statemachine/BulletBase.gd @@ -2,10 +2,11 @@ extends Area2D class_name BulletBase enum MotionType { - SWING, - PROJECTILE, - MAGIC, - SUMMON + SWING, # 挥舞(近战攻击) + PROJECTILE, # 射弹 + MAGIC, # 魔法 + SUMMON, # 召唤 + SPRINT, # 冲撞 } @export var displayName: String = "未知子弹"