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

    Function checkForFall

    • Checks if player should fall and determines fall animation.

      Integrates BalanceSystem and ConsciousnessSystem to check fall conditions. Returns animation state to transition to if fall is triggered.

      Korean terminology:

      • 균형상실 (Gyunhyeong Sangsil): Balance loss
      • 의식상실 (Uisik Sangsil): Consciousness loss

      Parameters

      • player: PlayerState

        Player state to check

      • combatSystem: CombatSystem

        Combat system with balance and consciousness systems

      • OptionallastImpactAngle: number

        Optional angle of last impact (for consciousness falls)

      • OptionalattackAngle: number

        Optional angle of current attack (for balance falls)

      Returns FallCheckResult

      Fall check result with animation state

      const fallCheck = checkForFall(player, combatSystem, undefined, attackAngle);
      if (fallCheck.shouldFall && fallCheck.animationState) {
      animationMachine.transitionTo(fallCheck.animationState);
      console.log(`Player falling: ${fallCheck.reason}`);
      }

      낙법확인