Exemple #1
0
        public void Start()
        {
            GameObject.DontDestroyOnLoad(this);
            Instance    = this;
            heightRatio = getHeightRatioMap(PD.body);
            BM          = new BoundsMap(heightRatio, PD.gridLevel);
            kerbGO      = new GameObject();
            kerbGO.name = "kerbGO";

            kerbGO.transform.parent        = PD.body.MapObject.transform;
            kerbGO.transform.localScale    = Vector3.one * 1000;
            kerbGO.transform.localPosition = Vector3.zero;
            kerbGO.transform.localRotation = Quaternion.identity;


            or = gameObject.AddComponent <OverlayRenderer>();

            or.SetGridLevel(PD.gridLevel);

            foreach (PlanetData pd in WeatherDatabase.PlanetaryData)
            {
                if (!bodyRadii.ContainsKey(pd.body))
                {
                    bodyRadii.Add(pd.body, bodyradius);
                }
                else
                {
                    bodyRadii[pd.body] = bodyradius;
                }
            }
        }