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

public class PlayerManager : MonoBehaviour {


    public List<GameObject> myLimbs;

    public GameObject levelmanager;
    // Use this for initialization
	void Start () {
		
	}
	
	// Update is called once per frame
	void Update () {
        int hpCount = 0;
        foreach (GameObject limb in myLimbs) {
            if (limb.GetComponent<LimbBehaviour>().currentHealth > 0) {
                hpCount++;

            }


        }


        if (hpCount == 0) {
            // you lose cus all ur limb no hp
            levelmanager.GetComponent<LevelManager>().loseGame();
        }

	}
}
