#pragma strict
var flame : GameObject;
var glow : Light; 
//var Player : GameObject;


function Start () {
//Player = GetComponent(GameObject) as GameObject;
flame.SetActive(false);
glow.intensity = 0.0;
}

function Update () {

}

function OnTriggerEnter(co : Collider)
{
	flame.SetActive(true);
	glow.intensity  = 1.5;
	co.GetComponent(MovementBasic).OnDeath();
	 for(var i : int = 0; i < 30; i++)
	 {
		glow.range = 8.50;
        yield WaitForSeconds (0.05);
        glow.range = 7.50;
        yield WaitForSeconds (0.05);
     }
        
	glow.intensity = 0.0;
	flame.SetActive(false);
}
