public static PlanetList createPlanetDatabase() { asset = ScriptableObject.CreateInstance <PlanetList>(); AssetDatabase.CreateAsset(asset, "Assets/Resources/Databases/PlanetDatabase.asset"); AssetDatabase.SaveAssets(); return(asset); }
public PlanetNavigationBox() { InitializeComponent(); _planetList = new PlanetList(Program.Repository); _planetList.CollectionChanged += PlanetListChanged; _planetList.SelectedPlanetChanged += SelectedPlanetChanged; BindPlanetList(); }
/* Resets all entity lists to empty */ private void ClearLists() { PlayerList.Clear(); PlanetList.Clear(); ProjectileList.Clear(); BlackHoleList.Clear(); BloodParticleList.Clear(); EntityList.Clear(); PhysicalObjectList.Clear(); GravityPointList.Clear(); }
public void Add(Planet item) { Debug.Assert(item != null, "item is null."); /* * Color[] colorData = new Color[item.SourceRect.Width * item.SourceRect.Height]; * item.Spritesheet.GetData<Color>(0, item.SourceRect, colorData, 0, colorData.Length); * Terrain.AddToTerrain((int)item.Position.X, (int)item.Position.Y, (int)item.Size.X, (int)item.Size.Y, false, true, true, colorData); */ PlanetList.Add(item); EntityList.Add(item); GravityPointList.Add(item); }
public static void RunOnce() { var typesToChange = new[] { typeof(PlanetClassD), typeof(PlanetClassF), typeof(PlanetClassM), typeof(PlanetClassS), }; foreach (Type t in typesToChange) { Planet currPlanet = PlanetList.find(t.Name); currPlanet.AddStartingResource(PlanetHelper.Metal, 15); currPlanet.AddStartingResource(PlanetHelper.Bioplastic, 15); currPlanet.AddStartingResource(PlanetHelper.MedicalSupplies, 15); currPlanet.AddStartingSpecialization(PlanetHelper.Carrier, 4); currPlanet.AddStartingSpecialization(PlanetHelper.Constructor, 1); } }
public Planet(string name, Planet parent) { Name = name; Satellites = new PlanetList(this); Parent = parent; }
public Planet(string name) { Name = name; Satellites = new PlanetList(this); }