예제 #1
0
        public bool ProvideCandidate(SmartInteractScanSettings settings, out ISmartInteractCandidate candidate)
        {
            candidate = null;
            if (!PotionOfReturnHelper.TryGetGateHitbox(settings.player, out Rectangle homeHitbox))
            {
                return(false);
            }
            float distanceFromCursor = homeHitbox.ClosestPointInRect(settings.mousevec).Distance(settings.mousevec);

            _candidate.Reuse(distanceFromCursor);
            candidate = _candidate;
            return(true);
        }
        public bool ProvideCandidate(
            SmartInteractScanSettings settings,
            out ISmartInteractCandidate candidate)
        {
            candidate = (ISmartInteractCandidate)null;
            Rectangle homeHitbox;

            if (!PotionOfReturnHelper.TryGetGateHitbox(settings.player, out homeHitbox))
            {
                return(false);
            }
            this._candidate.Reuse(homeHitbox.ClosestPointInRect(settings.mousevec).Distance(settings.mousevec));
            candidate = (ISmartInteractCandidate)this._candidate;
            return(true);
        }