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

public class DeathByFire : MonoBehaviour {
	public void DestryIfYourHandIsOnFire(){
		if(Sun.isHandOnFire){
			Sun.isHandOnFire = false;
			ParticleSystem[] temp = Valve.VR.InteractionSystem.InteractableButtonEvents.lastHandUsed.GetComponentsInChildren<ParticleSystem>();
			
			for (int i = 0; i < temp.Length; i++)
			{
				if(temp[i]!=null) temp[i].Stop();
			}
			
			Destroy(gameObject);
		}
	}
}
