Example #1
0
 public void UnhideFromHidePlace()
 {
     if (foundHidePlace != null)
     {
         foundHidePlace.OnUnhide(player);
         foundHidePlace = null;
     }
     playerHideHandle.Unhide();
 }
Example #2
0
        public bool TryHideInHidePlace(Action onInteract = null)
        {
            if (playerHideHandle.IsHidden)
            {
                return(false);
            }
            if (hideplaceDetector.GetDetectedCollidersCount() == 0)
            {
                return(false);
            }

            foundHidePlace = hideplaceDetector.GetFirstFoundObject();
            if (foundHidePlace.IsAccessible())
            {
                onInteract?.Invoke();
                foundHidePlace.OnHide(player);
                playerHideHandle.Hide(foundHidePlace.GetHidePlaceInfo());
                return(true);
            }

            return(false);
        }