public void UnhideFromHidePlace() { if (foundHidePlace != null) { foundHidePlace.OnUnhide(player); foundHidePlace = null; } playerHideHandle.Unhide(); }
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); }