// Update is called once per frame void Update() { if (foundOwner) { deathScript.beginDeath(); } else if (foundTarget) { if (this.gameObject.tag != "boomerangProjectile") { deathScript.beginDeath(); } } }
void Update() { if (Time.time - startTime >= liveTime) { thisDeath.beginDeath(); } }
public void AddHealth(float health){ if(health > 0){ currHealth = Mathf.Min(currHealth + health, maxHealth); } else{ currHealth = Mathf.Max(currHealth + health, 0); } if(currHealth == 0){ deathHandler.beginDeath(); } }