// 2026년 포트폴리오용 재구성 코드. 실제 업무 당시 소스가 아닙니다. // 2026 portfolio reconstruction. Not original production source. using System; using UnityEngine; namespace PortfolioExamples { public sealed class PathRecovery { Vector3 last; bool initialized; float idle; public bool Tick(Vector3 position, bool shouldMove, float deltaTime, float timeout, float epsilon) { if (deltaTime < 0 || timeout <= 0 || epsilon < 0) throw new ArgumentOutOfRangeException(); if (!initialized) { last = position; initialized = true; return false; } if (!shouldMove || (position-last).sqrMagnitude > epsilon*epsilon) { idle = 0; last = position; return false; } idle += deltaTime; if (idle < timeout) return false; idle = 0; return true; // Caller must validate collision-free lateral space before moving. } public void Reset() { initialized=false; idle=0; } } }