Exemplo n.º 1
0
    // Update is called once per frame
    void Update()
    {
        timeElapsed += Time.deltaTime;
        effectTimer += Time.deltaTime;

        if (timeElapsed > regenSpeed)
        {
            timeBar.IncrementTime(regenAmount);
            timeElapsed -= regenSpeed;
        }

        if (effectTimer > duration)
        {
            Destroy(this);
        }
    }
Exemplo n.º 2
0
 protected override void ApplyEffect(GameObject target)
 {
     timeBar.IncrementTime(200f);
 }