using UnityEngine;
using System.Collections;

public class ItemTaken : Item {

	public items item;

	void Start () {
		gc = GameController.instance;
		room = FindObjectOfType<Room>();
		if(GameController.inventory.Contains (item)){
			Destroy (gameObject);
		}
	}

	void Action(){
		gc.SendMessage ("PickItem", item);
		if(item == items.Slippers){
			room.SendMessage ("ShowMessage","You put your slippers on to quietly sneak out.");
			room.player.SendMessage ("UseSlippers");
		}
		if(audio){
			audio.Play ();
		}
		room.player.SendMessage ("UnsetInteractiveItem");
		room.SendMessage("HideObjText");
		Destroy (gameObject);
	}
}
