using UnityEngine;
using System.Collections;

public class HandbagChild : Item {

	void Action(){
		StartCoroutine (EmergencyCall ());
	}
	IEnumerator EmergencyCall(){
		room.player.rigidbody2D.velocity = Vector2.zero;
		Destroy(room.player);
		room.SendMessage ("ShowMessage","You found your parent's mobile. While playing with it you dialled welfare services.\nYour mum is not happy.");
		yield return new WaitForSeconds(room.msgTime );
		audio.Play ();
		yield return new WaitForSeconds(room.msgFadeTime);
		gc.Penalty (20f);
		gc.SendMessage ("ClearChildItems");
		Application.LoadLevel("ChildLandingDn");
	}
}
