public void ImporterTest() { GeneralImporter <CataloguePool> importer = new GeneralImporter <CataloguePool>("export.ld"); CataloguePool cp = importer.Import(); Assert.IsNotNull(cp); foreach (MusicEntity me in cp.GetCatalogue(0).MusicList) { PrintClass(typeof(MusicEntity), me); } }
public static MusicEntity PROC_LUNA_NEXT(int type, object[] args, CataloguePool cp, ref Catalogue chosen, ref int ptr) { if (type == (int)DefinedCmd.LUNA_NEXT) { if (chosen == null) { chosen = cp.GetCatalogue(0); } if (args.Length > 2) { LpsAudio.AudioDelegations.ChangeVolume((float)args[2] / 100f); } return(chosen.getNext()); } return(null); }
public static MusicEntity PROC_LUNA_PLAY(int type, object[] args, CataloguePool cp, ref Catalogue chosen, ref int ptr) { if (type == (int)DefinedCmd.LUNA_PLAY) { if (chosen == null) { chosen = cp.GetCatalogue(0); } if (args.Length > 1) { LpsAudio.AudioDelegations.ChangeVolume((float)args[1] / 100f); } return(chosen.getMusic(ScriptUtil.RemoveExtension(args[0] as string))); } return(null); }
public static MusicEntity PROC_LUNA_PLAYN(int type, object[] args, CataloguePool cp, ref Catalogue chosen, ref int ptr) { if (type == (int)DefinedCmd.LUNA_PLAYN) { if (chosen == null) { chosen = cp.GetCatalogue(0); } if (args.Length > 1) { LpsAudio.AudioDelegations.ChangeVolume((float)args[1] / 100f); } int num = (int)args[0]; if (num < 0) { return(chosen.getMusic(new Random().Next(0, chosen.GetCount()))); } else { return(chosen.getMusic(num)); } } return(null); }