예제 #1
0
	public void returnToMainMenu() {
		InterfaceMainButtons.REF.onCloseOtherScreen();
		if(otherCars!=null) {
			Destroy(otherCars.gameObject);
			Destroy(otherCars);
			otherCars = null;

		}
		Destroy(this.gameObject);
	}
예제 #2
0
	public void showOtherCars() {
		if(otherCars!=null) {
			Destroy(otherCars.gameObject);
		}






		GameObject go = NGUITools.AddChild(this.gameObject.transform.parent.gameObject,prefabBuyCars.gameObject);







		Debug.Log (go.name);

		otherCars = go.GetComponent<BuyCarsScreen>();
		if(otherCars!=null)
			otherCars.init(this,this.carRef);
		hideButtons();
	}