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

public class FollowerStateControl : MonoBehaviour {

	#region Private Variables
	[SerializeField]
	private Sprite _normal;

	[SerializeField]
	private Sprite _red;

	[SerializeField]
	private Sprite _green;

	[SerializeField]
	private Sprite _blue;

	[SerializeField]
	private Sprite _purple;

	[SerializeField]
	private Sprite _white;

	private SpriteRenderer _renderer;
	#endregion


	#region Events
	void Awake () {

		_renderer = GetComponent <SpriteRenderer> ();
		
	}
	#endregion


	#region Methods
	public void UpdateState (Color c) {

		_renderer.sprite = _normal;

		if (c == new Color (1f, 1f, 1f, 0.3f))
			_renderer.sprite = _white;

		if (c == new Color (1f, 0f, 0f, 0.3f))
			_renderer.sprite = _red;

		if (c == new Color (0f, 1f, 0f, 0.3f))
			_renderer.sprite = _green;

		if (c == new Color (0f, 0f, 1f, 0.3f))
			_renderer.sprite = _blue;

		if (c == new Color (1f, 0f, 1f, 0.3f))
			_renderer.sprite = _purple;
		
	}
	#endregion

}
