public void SwitchLevel(LevelDescriptor ld) { StopTimers(); game.DisableSimulation(); level.Clear(); DownloadLevel(ld); }
// async public void DownloadLevel(LevelDescriptor ld) { ResourceDownloader rd = new ResourceDownloader("levels"); rd.AddItem(ld.Name, "foreground.xaml"); rd.AddItem(ld.Name, "background.xaml"); rd.AddItem(ld.Name, "entities.py"); rd.AddItem(ld.Name, "logic.py"); rd.AllCompleted += new EventHandler(rd_AllCompleted); rd.AnyFailed += new EventHandler(rd_AnyFailed); rd.Start(); }