using UnityEngine;
using System.Collections;

public class LifeElixir : Item {
	
	int regeneration = 20;
	
	public LifeElixir(){
		name = "Elixir";
		uv = new Coordinate(17, 0);
	}
	
	public override bool Use(){
		Hero.instance.life += regeneration;
		if (Hero.instance.life > Hero.instance.maxLife){
			Hero.instance.life = Hero.instance.maxLife;
		}
		GameInterface.UpdateLife(Hero.instance.life);
		Destroy();
		return true;
	}
}
