// Update is called once per frame void Update() { if (start_clock == false) { return; } timer += Time.deltaTime; if (timer > life) { hud_controller.EffectFinished(character, id); Destroy(gameObject); //END return; } float value = timer / life; clock.fillAmount = 1 - value; }
private void DestroyShield() { shield_zone.EnableCollision(false); hud.EffectFinished(Enums.Characters.BARION, hud_id); Destroy(gameObject); }