예제 #1
0
    // 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;
    }
예제 #2
0
 private void DestroyShield()
 {
     shield_zone.EnableCollision(false);
     hud.EffectFinished(Enums.Characters.BARION, hud_id);
     Destroy(gameObject);
 }