Files
ConvenientHorror/Assets/Scripts/Life/ChangeHealth.cs

34 lines
726 B
C#

using UnityEngine;
public class ChangeHealth : MonoBehaviour
{
public int maxHealth;
public int health;
void Start() {
health = maxHealth;
}
public void Hit(int amount) {
health -= amount;
if (health < 0) {
health = 0; // no negatives
Debug.Log("Death");
Die();
}
}
public void Die() {
// Saves current day
Debug.Log("Save the current day");
// Jumpscare
Debug.Log("Jumpscare! Boo!");
// After Jumpscare Delay Overlay appears
// Decline Overlay
Debug.Log("Return to Main Menue");
// Accept
Debug.Log("Get 1 heart back and get 25+ energy back");
}
}