using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;


[ExecuteInEditMode]
public class TurnOffBounds : MonoBehaviour {

	// Update is called once per frame
	void Update () {
		if (SceneManager.GetActiveScene ().name == "GameIsland") {
			if (gameObject.GetComponent<Collider> ()) {
				if (gameObject.GetComponent<Collider> ().enabled == true) {
					gameObject.GetComponent<Collider> ().enabled = false;
				}
			}
			if (gameObject.name == "Bounds Box" && transform.childCount > 0) {
				foreach (Transform child in transform) {
					if (child.GetComponent<Collider> ().enabled == true) {
						child.GetComponent<Collider> ().enabled = false;
					}
				}
			}
		}
	}
}
