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

public class Flashing : MonoBehaviour {
	public Sprite litImage;
	public Sprite dimImage;
	bool IsFlashing = true;
	public bool Lit = false;
	// Use this for initialization
	void Start () {
		
	}
	
	// Update is called once per frame
	void Update () {
        //this.GetComponent<Image>().sprite = (Lit) ? litImage:dimImage;
        //if(IsFlashing) {
        //	Lit = false;
        //	StartCoroutine(WaitFast());
        //	Lit = true;
        //}

        if (Lit)
        {
            GetComponent<Image>().sprite = litImage;
        }
        else
        {
            GetComponent<Image>().sprite = dimImage;
        }
	}

	/*IEnumerator WaitFast() {
		yield return new WaitForSeconds(0.25f);
	}

	IEnumerator WaitSlow() {
		yield return new WaitForSeconds(0.5f);
	}*/
}
