using UnityEngine;
using System.Collections;

public class PlayerStats : MonoBehaviour {

    public static PlayerStats instance;

    public float stamina;
    public float health;

    public float max_stamina = 100;
    public float max_health = 100;


    public float stamRegen = 0.3f;
    public float hpRegen = 0.01f;



	// Use this for initialization
	void Start () {
        instance = this;
        health = max_health;
        stamina = max_stamina;

	}

    public void hurt(float amount) {
        health -= amount;

        if (health <= 0) {
            ScreenFader.instance.changeLevel(Application.loadedLevelName);
        }



    }
	
	// Update is called once per frame
	void Update () {
	    
	}
}
