using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Status
{
    private float m_TimeLeft;
    public float TimeLeft { get { return m_TimeLeft; } }

    public Status(float _duration)
    {
        m_TimeLeft = _duration;
    }

    public virtual void Update(Player _owner)
    {
        m_TimeLeft -= Time.deltaTime;

        if (m_TimeLeft <= 0)
        {
            m_TimeLeft = 0;
            return;
        }

        // Only apply the effect is status is running
        ApplyEffect(_owner);
    }

    public virtual void ApplyEffect(Player _owner)
    {

    }
}
