﻿using UnityEngine;
using System.Collections;

public class GetHome : MonoBehaviour {

	public GameObject myHome;

	// Use this for initialization
	void Start () {
		//myHome = null;
	}
	
	// Update is called once per frame
	void Update () {
	
		if (Time.frameCount % 150 == 0) {

			//if(myHome == null) print (name + "pas de maison");

				}
	}

	public void setHome(GameObject h){
		myHome = h;
		print ("now home is set");
		//print (myHome.name);
	}

	public GameObject returnHome(){
		//

		if (myHome != null) {
						//print ("hey ! return home" + myHome.name);
						return myHome;
				} else {
			//print ("sorry , home is null");
				}

		return null;

	}



}
