// Seed Array has randomly generated numbers for all types of system possibilites. void NewSystem() { Debug.Log("New System"); seedArray = SystemSeed.RandomSeed(); CreateID(); Debug.Log("System SEED: " + ID); asteroidSpawner = this.gameObject.GetComponent("AsteroidFields") as AsteroidFields; CreateAsteroids(); CreateSun(); CreatePlanets(); CreateFleetManager(); CreateSkyBox(); NetworkManager.LoadingIncrement(); }
public void SetInfo(AsteroidFields.Grouping inGrouping, float groupDistance, int inAsteroidAmount, AsteroidFields afIn) { groupType = inGrouping; grouping = groupDistance; asteroidsAtBeacon = inAsteroidAmount; asteroidFieldClass = afIn; }
void LoadSystem(int i) { //SaveSystem(); if (i > 5) { // Load from XML file. } systemPlanets = systemsInMemory[i].systemPlanets; isInhabited = systemsInMemory[i].isInhabited; ID = systemsInMemory[i].ID; starRadius = systemsInMemory[i].starRadius; starMaterial = systemsInMemory[i].starMaterial; seedArray = systemsInMemory[i].seedArray; asteroidSpawner = this.gameObject.GetComponent("AsteroidFields") as AsteroidFields; //asteroidSpawner.groupsInMemory = systemsInMemory[i].asteroidGroups; asteroidSpawner.gState = AsteroidFields.GameState.Playing; LoadPlanets(); LoadSun(); systemsInMemory.RemoveAt(i); }