예제 #1
0
파일: Heal.cs 프로젝트: 266899/Mazee
 protected virtual void ButtonTwoPressed(object sender, ControllerInteractionEventArgs e)
 {
     state = !state;
     if (potion.GetPotionCount() > 0)
     {
         FindObjectOfType <AudioManager>().Play("Drinking");
         Debug.Log("heal");
         playerScript.playerHealth += 30f;
         potion.RemovePotion();
     }
 }
예제 #2
0
파일: HealthBar.cs 프로젝트: 266899/Mazee
 // Update is called once per frame
 void Update()
 {
     healthBar.fillAmount = playerScript.playerHealth / 100f;
     potionCounter.text   = potion.GetPotionCount().ToString();
 }