using UnityEngine;
using System.Collections;

public class deathTime : MonoBehaviour
{

    private bool _waitingToAction = true;
    public float _timeToAction = 2f;
    private float _time = 0f;

    // Use this for initialization
    void Start()
    {
        GetComponent<AudioSource>().PlayDelayed(_timeToAction + 0.8f);

    }

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

        if (_waitingToAction)
        {
            _time += Time.deltaTime;

            if (_time >= _timeToAction)
            {
                GetComponent<Animator>().SetInteger("Special", 9);
            }

            return;
        }
    }
}
