public void LoadFromList(ISpawnList source) { Collection.Clear(); for (int ii = 0; ii < source.Count; ii++) { object obj = source.GetSpawn(ii); int rate = source.GetSpawnRate(ii); Collection.Add(new SpawnListElement(StringConv, rate, (double)rate / source.SpawnTotal, obj)); } }
public void LoadFromList(Type type, ISpawnList source) { Collection = (ISpawnList)Activator.CreateInstance(type); for (int ii = 0; ii < source.Count; ii++) { object obj = source.GetSpawn(ii); int rate = source.GetSpawnRate(ii); Collection.Add(obj, rate); } for (int ii = 0; ii < source.Count; ii++) { lbxCollection.Items.Add(getSpawnString(ii)); } }