public SimulationViewModel(AppConfig config) { m_config = config; if(config.Songs==null) { config.Songs = new List<Song>(); } Songs = config.Songs; LoadSongsCommand = new AwaitableDelegateCommand(LoadSongs); Simulator = new Simulator(config); GrooveBursts = new List<Tuple<AppealType?, string>> { Tuple.Create(new AppealType?(),"なし" ), Tuple.Create((AppealType?)AppealType.Vocal,"Vo 150%"), Tuple.Create((AppealType?)AppealType.Dance,"Da 150%"), Tuple.Create((AppealType?)AppealType.Visual,"Vi 150%") }; GrooveTypes = new List<Tuple<IdolCategory, string>> { Tuple.Create(IdolCategory.Cute, "Cu 30%"), Tuple.Create(IdolCategory.Cool, "Co 30%"), Tuple.Create(IdolCategory.Passion, "Pa 30%") }; SkillControls = new List<Tuple<SkillTriggerControl, string>> { Tuple.Create(SkillTriggerControl.Auto, "制御しない"), Tuple.Create(SkillTriggerControl.AlwaysTrigger, "100%発動する"), Tuple.Create(SkillTriggerControl.NeverTrigger, "発動しない"), }; StartSimulationCommand = new AwaitableDelegateCommand(StartSimulation); Simulator.Song = Songs.FirstOrDefault(); Simulator.Unit = Units.FirstOrDefault(); }
public SimulationViewModel(AppConfig config) { m_config = config; if (config.Songs == null) { config.Songs = new List<Song>(); } Songs = config.Songs; LoadSongsCommand = new AwaitableDelegateCommand(LoadSongs); Simulator = new Simulator(config); GrooveBursts = new List<Tuple<AppealType?, string>> { Tuple.Create(new AppealType?(),"なし" ), Tuple.Create((AppealType?)AppealType.Vocal,"Vo 150%"), Tuple.Create((AppealType?)AppealType.Dance,"Da 150%"), Tuple.Create((AppealType?)AppealType.Visual,"Vi 150%") }; GrooveTypes = new List<Tuple<IdolCategory, string>> { Tuple.Create(IdolCategory.Cute, "Cu 30%"), Tuple.Create(IdolCategory.Cool, "Co 30%"), Tuple.Create(IdolCategory.Passion, "Pa 30%") }; SkillControls = new List<Tuple<SkillTriggerControl, string>> { Tuple.Create(SkillTriggerControl.Auto, "制御しない"), Tuple.Create(SkillTriggerControl.AlwaysTrigger, "100%発動する"), Tuple.Create(SkillTriggerControl.NeverTrigger, "発動しない"), }; StartSimulationCommand = new AwaitableDelegateCommand(StartSimulation); Runs = config.SimulatorConfig.Runs; EnableGuest = config.SimulatorConfig.EnableGuest; Simulator.EnableRoomEffect = config.SimulatorConfig.EnableRoomEffect; Simulator.EnableSupportMembers = config.SimulatorConfig.EnableSupportMembers; Simulator.SkillControl = config.SimulatorConfig.SkillControl; var song = Songs.FirstOrDefault(x => x.Title == config.SimulatorConfig.SongTitle); if (song != null) { Simulator.Song = song; var data = Simulator.SongDataList.FirstOrDefault(x => x.Difficulty == config.SimulatorConfig.SongDifficulty); if (data != null) { Simulator.SongData = data; } } else { Simulator.Song = Songs.FirstOrDefault(); } var unit = Units.FirstOrDefault(x => x.Name == config.SimulatorConfig.UnitName); if (unit != null) { Simulator.Unit = unit; } else { Simulator.Unit = Units.FirstOrDefault(); } Simulator.GrooveBurst = config.SimulatorConfig.GrooveBurst; if(Simulator.GrooveBurst!=null) { Simulator.GrooveType = config.SimulatorConfig.GrooveType; } GuestIid = config.SimulatorConfig.GuestIid; Simulator.GuestPotential = config.SimulatorConfig.GuestPotential; UtilizeActualPattern = config.SimulatorConfig.UtilizeActualPattern.GetValueOrDefault(true); CopyIidCommand = new DelegateCommand<int?>(CopyIid); SetGuestCenterCommand = new DelegateCommand<int?>(SetGuestCenter); }