using UnityEngine;

public class PuckSprite : MonoBehaviour
{
	public Color NormalColor = Color.white;
	public Color StunnedColor = Color.gray;

	private SpriteRenderer rend;
	private PuckMove puck;

    void Update()
    {
		if (puck.IsStunned())
			rend.color = StunnedColor;
		else
			rend.color = NormalColor;
    }

	void Start()
    {
		rend = GetComponent<SpriteRenderer>();
		puck = GetComponent<PuckMove>();
    }
}
