#pragma strict

public var SustractHealth : int = 1;
public var timeRateSustraction : float = 1;
private var timeRateSustractionCheck : float = 0;


function OnTriggerStay (other : Collider) {
	if(other.transform.tag == "Player" && Time.time >= timeRateSustractionCheck){
		GeneralVars.nSalud -= SustractHealth * Time.deltaTime;
		timeRateSustractionCheck = Time.time + timeRateSustraction;
	}
}