﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace Tap.Tilt
{
    public class ActivationTimer : MonoBehaviour
    {
        public bool invert = false;
        public float duration = 1f;
        
        // Start is called before the first frame update
        void OnEnable()
        {
            StartCoroutine(ActiveSwitcher());
        }

        IEnumerator ActiveSwitcher()
        {
            yield return new WaitForSeconds(duration);
            gameObject.SetActive(invert);
        }
    }
}
