using UnityEngine; using Colosseum.AI; using Colosseum.Enemy; namespace Colosseum.AI.BehaviorActions.Conditions { /// /// 패턴 준비 여부를 확인하는 공통 헬퍼 메서드를 제공합니다. /// public static class PatternReadyHelper { /// /// 지정된 패턴이 현재 실행 가능한지 확인합니다. /// 패턴의 특성 필드를 사용하여 grace period 등을 판단합니다. /// public static bool IsPatternReady(GameObject gameObject, BossPatternData pattern) { if (pattern == null) return false; BossBehaviorRuntimeState context = gameObject.GetComponent(); if (context == null) return false; if (context.IsBehaviorSuppressed) return false; if (context.CurrentPatternPhase < pattern.MinPhase) return false; if (!context.IsPatternGracePeriodAllowed(pattern)) return false; return context.IsPatternReady(pattern); } } }