using UnityEngine;
using System.Collections;

public class MagicTool : MonoBehaviour
{

	public Sprite Symbol1, Symbol2, Symbol3, Symbol4;

	public MagicToolEnum type;

	void Start ()
    {

	}

	void Update ()
    {
	
	}

	public new MagicToolEnum GetType(){
		return type;
	}

    public void SetType(MagicToolEnum t)
    {
		SpriteRenderer spriteRenderer = GetComponentInChildren<SpriteRenderer> ();
        type = t;
		// change the sprite
		switch (type) {
		case MagicToolEnum.Symbol1:
			spriteRenderer.sprite = Symbol1;
			break;
		case MagicToolEnum.Symbol2:
			spriteRenderer.sprite = Symbol2;
			break;
		case MagicToolEnum.Symbol3:
			spriteRenderer.sprite = Symbol3;
			break;
		case MagicToolEnum.Symbol4:
			spriteRenderer.sprite = Symbol4;
			break;
		}
    }

	public void PickedUp(){
        //Debug.Log("wellA!!");
		gameObject.Recycle();
	}
}
