示例#1
0
    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;
     }
 }
示例#3
0
 void Awake()
 {
     if (instance != null)
     {
         if (instance != this)
         {
             Destroy(gameObject);
         }
     }
     instance = this;
 }
示例#4
0
    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);
    }