using UnityEngine;
using System.Collections;

public class WaterClosetDoorScript : MonoBehaviour {

	public int trainCarNumber = 0;

	public Material vacantMaterial;
	public Material occupiedMaterial;

	private bool isVacant = true;
	
	// Use this for initialization
	void Start () {
		
	}
	
	// Update is called once per frame
	void Update () {
		
	}
	
	
	public void interactWithDoor(){
		
		// TODO: if bang on door and occupied, penalize player

		if(isVacant){
			//Debug.Log("RoomDoor:: Banged on vacant WC door.");
		}else{
			Debug.Log("TODO: play occupied WC sound");
			//TODO: play angry passenger "go away" sound
		}
		
	}

	public void makeVacant(bool vacant){

		isVacant = vacant;

		if(isVacant){
			gameObject.renderer.material = vacantMaterial;
		}else{
			gameObject.renderer.material = occupiedMaterial;
		}

	}

	public bool isWCVacant(){
		return isVacant;
	}
	
}
