using UnityEngine;
using System.Collections;

public class Icon : MonoBehaviour {

	public Animator anim;
	SpriteRenderer sr;

	void Start () {
		sr = anim.GetComponent<SpriteRenderer>();
	}

	public void Show (string resource, bool super = false) {
		int idx = resource == "water" ? 2 : 0;
		idx += super ? 1 : 0;
		sr.sprite = Game.instance.iconSprites[idx];
		anim.SetTrigger("Show");
	}
}
