Black Trigram (흑괘) - Korean Martial Arts Combat Simulator API - v0.7.0
    Preparing search index...

    Class BoneImpactAudioSystem

    Bone Impact Audio System

    Centralized system for playing anatomically-accurate bone and flesh impact sounds based on strike location, intensity, and target health.

    Index

    Constructors

    Methods

    • Play Korean-English bilingual audio cue (Future feature - placeholder for now)

      Parameters

      • _cueId: string

      Returns Promise<void>

    • Play bone impact sound based on event parameters

      Korean: 골절음 재생

      Parameters

      • event: BoneImpactEvent

        Bone impact event with region, intensity, and health info

      • Optional_position: Vector3

        Optional 3D position for spatial audio (future feature, not yet implemented)

      Returns Promise<void>

      Promise that resolves when sound starts playing

      await system.playBoneImpact(
      { region: 'head', intensity: 'heavy', vitalPoint: false },
      { x: 0, y: 1.8, z: 0 }
      );
    • Play bone impact from damage and position Auto-detects body region and calculates intensity

      Parameters

      • damage: number

        Damage amount

      • remainingHealth: number

        Target's remaining health

      • hitPosition: Vector3

        3D position where strike landed

      • isVitalPoint: boolean = false

        Whether strike hit a vital point

      Returns Promise<void>

      await system.playBoneImpactFromDamage(
      40,
      60,
      { x: 0, y: 1.8, z: 0 },
      false
      );
    • Play bone impact from vital point strike

      Parameters

      • vitalPoint: VitalPoint

        Vital point that was struck

      • impactForce: number

        Force of impact (damage amount)

      • remainingHealth: number

        Target's remaining health

      • position: Vector3

        3D position of strike

      Returns Promise<void>

      await system.playBoneImpactFromVitalPoint(
      ribVitalPoint,
      35,
      25,
      { x: 0.2, y: 1.2, z: 0 }
      );

    Properties

    audioManager: AudioManagerInterface
    config: Required<BoneImpactAudioConfig>
    lastPlayTime: number = 0