public void exitHike() { isHiking = false; transitionHikePanel.TriggerFadeOut(); directionsHandler.waypointList.Clear(); directionsHandler.clearLine(); }
public void CloseMenu() { isOpen = false; menuTransitionObject.TriggerFadeOut(); if (uiHandler.isHiking && uiHandler.inAR) { StartCoroutine(waitPanel(1f)); panelTransitionObject.TriggerTransition(); } Time.timeScale = 1; menuBlockPanel.gameObject.SetActive(false); }
public void OpenMenu() { if (uiHandler.isHiking) { panelTransitionObject.TriggerFadeOut(); StartCoroutine(waitPanel(0.6f)); } menuTransitionObject.TriggerTransition(); isOpen = true; Time.timeScale = 0; menuBlockPanel.gameObject.SetActive(true); }
/// <summary> /// This is called when the heart has shrunk to the smallest size, it is used to determine how big to grow /// </summary> public void AtSmallestSize() { int indexChange = CheckIfIndexChanged(); //has the icon we need to animate changed if (indexChange < 0) //if health needs to decrease { if (beatingTransition.ScalingTransition.transform.localScale == Vector3.zero) //if called again and shrunk to nothing { UpdateIndex(indexChange); //update the index to animate the next icon indexChange = CheckIfIndexChanged(); //check for the new change if (indexChange == 0) //if we are on the right icon { UpdateStartPoint(); //call again so the correct new min size is set } else { beatingTransition.ScalingTransition.startPoint = Vector3.zero; //otherwise fully shrink the next heart as well } beatingTransition.ScalingTransition.endPoint = Vector3.one; //make sure to start a full sized heart beatingTransition.TriggerFadeOut(); } else//still mid beat! So shrink to nothing { beatingTransition.ScalingTransition.startPoint = Vector3.zero;//shrink to nothing beatingTransition.ScalingTransition.endPoint = beatingTransition.ScalingTransition.transform.localScale;//start at currentSize beatingTransition.TriggerFadeOut(); } } #region Beat Normally else if (indexChange == 0) { UpdateEndPoint(); } #endregion }
/// <summary> /// This is called when the heart has shrunk to the smallest size, it is used to determine how big to grow /// </summary> public void AtSmallestSize() { float difference = healthBar.currentValue - index; //has the icon we need to animate changed if (difference < 0) //if health needs to decrease { if (transition.ScalingTransition.transform.localScale == Vector3.zero) //if called again and shrunk to nothing { transition.ScalingTransition.endPoint = Vector3.zero; //stop the animation } else//still mid beat! So shrink to nothing { transition.ScalingTransition.startPoint = Vector3.zero; //shrink to nothing transition.ScalingTransition.endPoint = transition.ScalingTransition.transform.localScale; //start at currentSize transition.TriggerFadeOut(); } } #region Beat Normally else if (difference < 1) { healthBar.UpdateEndPoint(index); } #endregion }