using UnityEngine;
using System.Collections;

public class EggBehaviour : MonoBehaviour {
	private int id;
	private int egg;
	// Use this for initialization
	void Start () {
		id = System.Convert.ToInt32(this.gameObject.name.ToCharArray () [2] - '0');
		egg = System.Convert.ToInt32(this.gameObject.name.ToCharArray () [9] - '0');
	}
	
	// Update is called once per frame
	void Update () {
		if (RefereeBehaviour.getLivesOfCharacter(id-1) < egg) {
			this.renderer.enabled = false;
		}

	}
}
