Exemplo n.º 1
0
 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));
     }
 }
Exemplo n.º 2
0
 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));
     }
 }