using UnityEngine;
using System.Collections;

public class FaceChanger : MonoBehaviour {

	[SerializeField]
	Sprite[] availableSprites;

	[SerializeField]
	SpriteRenderer spriteRenderer;
	Sprite activeSprite;
	
	public void ChangeFace()
	{
		int randomNumber = Random.Range(0, availableSprites.Length);

		spriteRenderer.sprite = availableSprites[randomNumber];

		activeSprite = availableSprites[randomNumber];
	}

	public Sprite GetFace()
	{
		return spriteRenderer.sprite;
	}

	public void SetFace(Sprite faceToChangeTo)
	{
		spriteRenderer.sprite = faceToChangeTo;
	}

}
