using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class GUIBars : MonoBehaviour {

    public Image health;
    public Image stamina;
    public Text timer;

    public int player;

	// Use this for initialization
	void Start () {
		
	}

    // Update is called once per frame
    void Update()
    {
        switch (player)
        {
            case 0:
                health.fillAmount = (float)gameControl.P1HP / (float)100;
                stamina.fillAmount = (float)gameControl.P1Stam / (float)15;
                break;

            case 1:
                health.fillAmount = (float)gameControl.P2HP / (float)100;
                stamina.fillAmount = (float)gameControl.P2Stam / (float)15;
                break;

            default:
                break;
        }
    }
}
