using UnityEngine;
using System.Collections;

public class Poo : Item {

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

	void Action(){
		StartCoroutine (Dirty ());
	}

	IEnumerator Dirty(){
		room.player.rigidbody2D.velocity = Vector2.zero;
		room.HideObjText();
		room.player.SendMessage ("UnsetInteractiveItem");
		Destroy(room.player);
		room.SendMessage ("ShowMessage","You got all dirty and mum got very upset! Off you go for a bath!");
		yield return new WaitForSeconds(room.msgTime +room.msgFadeTime);
		GameController.roomStart = 5f;
		Application.LoadLevel("ChildToilet");

	}

}
