private void Initialize() { starManager = FindObjectOfType <StarManager>(); UIPlanetSelector = FindObjectOfType <PlanetSelector>(); layerRotationController = FindObjectOfType <LayerRotationController>(); layerRotationController.layers = new Transform [Planets.Length]; UIPlanetPositions = new Vector3 [Planets.Length]; UIPlanetSelector.planets = new GameObject[Planets.Length]; OrbitInstances = new GameObject[Planets.Length]; }
void Start() { if (instance != null) { Debug.LogError("There are two planet selectors for some reason!"); } else { instance = this; } }
void Awake() { if (instance != null) { if (instance != this) { Destroy(gameObject); } } instance = this; }
void Start() { if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); } PlanetInfoBox = GameObject.Find("PlanetInfoBox"); PlanetInfoBox_Name = PlanetInfoBox.transform.GetChild(2).GetComponent <Text>(); PlanetInfoBox_LevelReq = PlanetInfoBox.transform.GetChild(3).GetComponent <Text>(); PlanetInfoBox.SetActive(false); }