Exemple #1
0
        void GenerateStars()
        {
            GenerateHumanHomeStar(); // generate the human home system

            int starCount = gameDataRef.TotalSystems;

            for (int i = 0; i < starCount; i++)
            {
                Vector3 starLoc = DetermineStarLocation();

                StarData newStar = new StarData();

                newStar = GenerateGameObject.CreateNewStar(); // this creates the star and adds the data/accessor components
                // if the star type is 'no star', break this loop, and if it is too high (no specials or wolf rayet yet) no star either (yet)
                if ((int)newStar.SpectralClass >= 12)
                {
                    newStar.SpectralClass = StarData.eSpectralClass.NoStar;
                }

                if (newStar.SpectralClass == 0)
                {
                    continue;
                }
                newStar.SetWorldLocation(starLoc);
                gData.AddStarDataToList(newStar);
            }



            gData.galaxyIsGenerated = true; // add more checks here
        }
Exemple #2
0
        void GenerateNebulas()
        {
            int nebulaCount = Random.Range(0, 3);

            for (int x = 0; x < nebulaCount; x++)
            {
                GenerateGameObject.GenerateNebula();
            }
        }
Exemple #3
0
 public void UnBind()
 {
     _generateCell = null;
     _scrollRect   = null;
     _list         = null;
     _cell         = null;
     _existence.Clear();
     _buffer.Clear();
     _existence  = null;
     _scrollRect = null;
 }
Exemple #4
0
        public BindingHelperForList(ScrollRect scrollRect, IBindableList <T> list, GameObject cell, Model model, GenerateGameObject generateCell)
        {
            _scrollRect   = scrollRect;
            _list         = list;
            _cell         = cell;
            _model        = model;
            _generateCell = generateCell;

            if (_model == Model.OneTime)
            {
                OnListChanged(_list);
            }
            else if (_model == Model.OneWay)
            {
                OnListChanged(_list);
                _list.OnListChanged += OnListChanged;
            }
        }
Exemple #5
0
        void GeneratePlanets()
        {
            // populate the planet tables
            GenerateGameObject.PopulatePlanetGenerationTables();
            GenerateGameObject.PopulateRegionTypeTables();

            // populate the planet trait and region data lists
            gData.PopulatePlanetTraitList(DataManager.planetTraitDataList);  // move the static version to a public version? may not need this
            gData.PopulateRegionDataList(GenerateGameObject.regionTypeDataList);

            // run the planet generation routines for each star
            foreach (StarData star in gData.GalaxyStarDataList)
            {
                GenerateGameObject.CreateSystemPlanets(star);
                //foreach (PlanetData planet in star.PlanetList)
                //    gData.AddPlanetDataToList(planet);
            }
        }