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

public class ActivateRainbowKiller : MonoBehaviour {

	private RainbowKillerScript rbk;
	private bool startCounting = false;
	private float timer = 0;
	[SerializeField] private float timeToDeath = .5f;

	void Start () {
		GameObject Rainbow = GameObject.Find ("Rainbow");
		rbk = Rainbow.GetComponent<RainbowKillerScript> ();
	}

	void Update(){
		if(timer >= timeToDeath)
			rbk.anim.speed = 1;
		timer += Time.deltaTime;
	}

	void OnTriggerEnter2D(Collider2D col){
		startCounting = true;
	}
	
}


