summaryrefslogtreecommitdiff
path: root/Assets/Scripts/Effects/Effect.cs
blob: a8f0d37f01d7826bcff4ccc3a9f1b645da236a53 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Effect : MonoBehaviour
{
    public string Name;
    public float LifeTime;

    private float time;

    private void Awake()
    {
    }

    private void OnEnable()
    {
        time = 0;
    }

    private void Update()
    {
        time += Time.deltaTime;
        if(time > LifeTime)
        {
            EffectsManager.Instance.CycleEffect(this);
        }
    }

}