using UnityEngine;
using System.Collections;

public class BassShockTrigger : MonoBehaviour {
    public bool shock = false;
    public float kill = 0;
    // Use this for initialization
    void Start () {
	
	}
    public void BassMakeBeat()
    {
        shock = true;
        kill = 5;
        //Invoke("killShock", 1f);
    }
    // Update is called once per frame
    void killShock()
    {
        shock = false;
    }
    // Update is called once per frame
    void Update()
    {
        exist();
        if (kill > 0)
        {
            kill--;
        }
        else
        {
            killShock();
        }
    }

    void exist()
    {
        if (shock)
        {
            transform.localScale = new Vector3(1, 1, 1);
        }
        else
        {
            transform.localScale = new Vector3(0, 0, 0);
        }
    }
}
