private IEnumerator SpawnPack(PackConfiguration pack) { int maxValue = Random.Range(0, pack.addValue) + pack.minValue; for (int i = 0; i <= maxValue; i++) { SpawnNewNPC(pack.NPC); yield return(new WaitForSeconds(0.2f)); } }
public RatedPackConfigurator(ScheduleDataSet schedule) { this.schedule = schedule; if (pack_config == null) { pack_config = new PackConfiguration(schedule.schedule_dsn); DsnSQLUtil.MatchCreate(schedule.schedule_dsn, pack_config); DsnSQLUtil.FillDataTable(schedule.schedule_dsn, pack_config); } InitializeComponent(); }
public static PackDNA GetPackDNA(BingoSession session) { PackDNA pack_sequence = new PackDNA(); if (pack_config == null) { pack_config = new PackConfiguration(session.schedule.schedule_dsn); } DataRow session_row = session.schedule.GetSession(session.bingoday, session.session); if (session_row != null) { DataRow[] packs = pack_config.Select(SessionTable.PrimaryKey + "=" + session_row[SessionTable.PrimaryKey]); foreach (DataRow pack in packs) { pack_sequence.pack_sequence.Add(session.GameList.pack_list.GetPack(pack["pack_name"] as String, (String)null)); } } return(pack_sequence); }