public void GivenICanChooseFromTheseWindConditions(Table table) { foreach (var row in table.Rows) { Wind.Add(row[1], byte.Parse(row[0])); } }
/// <summary> /// Adds an event to the appropriate list for its type; returns the event. /// </summary> public Event Add(Event evnt) { switch (evnt) { case Event.Light e: Lights.Add(e); break; case Event.Sound e: Sounds.Add(e); break; case Event.SFX e: SFX.Add(e); break; case Event.Wind e: Wind.Add(e); break; case Event.Treasure e: Treasures.Add(e); break; case Event.Generator e: Generators.Add(e); break; case Event.Message e: Messages.Add(e); break; case Event.ObjAct e: ObjActs.Add(e); break; case Event.SpawnPoint e: SpawnPoints.Add(e); break; case Event.MapOffset e: MapOffsets.Add(e); break; case Event.Navmesh e: Navmeshes.Add(e); break; case Event.Environment e: Environments.Add(e); break; case Event.PseudoMultiplayer e: PseudoMultiplayers.Add(e); break; default: throw new ArgumentException($"Unrecognized type {evnt.GetType()}.", nameof(evnt)); } return(evnt); }
/// <summary> /// Adds an event to the appropriate list for its type; returns the event. /// </summary> public Event Add(Event evnt) { switch (evnt) { case Event.Light e: Lights.Add(e); break; case Event.Sound e: Sounds.Add(e); break; case Event.SFX e: SFX.Add(e); break; case Event.Wind e: Wind.Add(e); break; case Event.Treasure e: Treasures.Add(e); break; case Event.Generator e: Generators.Add(e); break; case Event.Message e: Messages.Add(e); break; default: throw new ArgumentException($"Unrecognized type {evnt.GetType()}.", nameof(evnt)); } return(evnt); }