using UnityEngine;
using System.Collections.Generic;

public class PlayerState : MonoBehaviour {

	public float Health = 100f;
	public float HealthRegen =5f;
	
	// Use this for initialization
	void Start () 
	{
	}
	
	// Update is called once per frame
	void FixedUpdate () {

		//quit mechanism
		if(Input.GetKey("escape"))
			Application.Quit();
		
		//health regen
		if(Health < 100)
			Health = Mathf.Clamp(Health + HealthRegen*Time.deltaTime, 0.0f, 100.0f);
	}	
}
