public void Use() { if (ShopManager.Singleton.actionBought >= 5) { ShopManager.Singleton.actionBought -= 5; my_SM.currentStamina += 5; my_SM.ShowStamina(); my_SM.CheckActualStamina(); canvasDefeatStamina.SetActive(false); canvasBuyAction.SetActive(false); canvasBonus.SetActive(false); canvasBoutique.SetActive(false); pauseButton.SetActive(true); Time.timeScale = 1f; } }
IEnumerator WaitForKill() { yield return(new WaitForSeconds(0.3f)); my_StaminaManager.currentStamina = -1; my_StaminaManager.ShowStamina(); my_StaminaManager.CheckActualStamina(); shopButton.SetActive(false); lifeButton.SetActive(true); }
void OnTriggerEnter(Collider other) { if (other.gameObject.tag == "Player" && !playerTriggered) { myDM.PlayAieSound(); playerTriggered = true; electricTrapAnim.SetActive(true); //my_SM.PlayTrapSound(); my_StaminaManager.currentStamina -= LoseStamina; my_StaminaManager.ShowStamina(); my_StaminaManager.CheckActualStamina(); } }