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

public class ShieldPowerUpEffect : PowerUpEffect
{
    public float immunityLength;    
    private GameObject _player;

    // Start is called before the first frame update
    void Start()
    {
        _player = GameEngine.mainPlayer;
    }

    public override void ApplyEffect()
    {
        if (_player != null)
        {
            PlayerColliderManager currentPCM = _player.GetComponent<PlayerColliderManager>();
            if (currentPCM != null)
            {
                currentPCM.SetImmune(immunityLength);
            }
        }
    }

    // Update is called once per frame
    void Update()
    {
        
    }
}
