void Start( ) { glitchEffect.enabled = true; //Load the sheet currentSheet = NoR2252Application.CurrentSheet; InitRecord( ); foreach (SheetNote note in currentSheet.notes) { queueNotes.Enqueue(note); } video.url = currentSheet.music; title.text = currentSheet.name; author.text = currentSheet.author; cover.texture = currentSheet.cover; pauseTitle.text = currentSheet.name; pauseAuthor.text = currentSheet.author; NoR2252Application.PreLoad = currentSheet.notePreload; NoR2252Application.Size = currentSheet.size; //add listener of video preparecompleted to OnPrepared //when video is ready call OnPrepared video.prepareCompleted += OnPrepared; clipLength = Mathf.Infinity; //Set all the noteInfo to objectPooling //SetNoteToObjectPool ( ); //play the fade animation uiAnimHandler.Animation.Play(uiFadeClip.name); }
private void Start( ) { Firebase.FirebaseApp.CheckAndFixDependenciesAsync( ).ContinueWith(task => { var dependencyStatus = task.Result; if (dependencyStatus == Firebase.DependencyStatus.Available) { // Create and hold a reference to your FirebaseApp, // where app is a Firebase.FirebaseApp property of your application class. // app = Firebase.FirebaseApp.DefaultInstance; // Set a flag here to indicate whether Firebase is ready to use by your app. } else { UnityEngine.Debug.LogError(System.String.Format( "Could not resolve all Firebase dependencies: {0}", dependencyStatus)); // Firebase Unity SDK is not safe to use here. } }); if (IsTest) { NoR2252Application.Option = new Option(0f, 0.5f, 0.3f); GameSheet s = SourceLoader.LoadSheet(sheet, tex); NoR2252Application.CurrentSheet = s; } }
public void TestGameSheets() { var projectPath = Directory.GetParent(Directory.GetCurrentDirectory()).Parent.FullName; string filePath = Path.Combine(projectPath, "Resources/playersheet.png"); GameSheet gs = new GameSheet(filePath); Assert.IsNotNull(gs.Picture); }
public static GameSheet LoadSheet(TextAsset sheetFile, Texture2D cover) { Sheet s = SourceLoader.LoadSheetFromBundle(sheetFile); GameSheet gameSheet = new GameSheet(s.name, s.author, s.bpm, s.notes, s.musicOffset, s.size, s.notePreload, s.screenSize); if (s != null) { gameSheet.music = Application.persistentDataPath + "/Editor/" + s.music + ".mp4"; gameSheet.cover = cover; } return(gameSheet); }
/// <summary>get the gamesheet from assetBundle also set the texture and video url</summary> public static GameSheet ConvertBundleToGameSheet(AssetBundle bundle) { TextAsset sheetFile = bundle.LoadAsset <TextAsset> (bundle.name); Sheet s = SourceLoader.LoadSheetFromBundle(sheetFile); GameSheet gameSheet = new GameSheet(s.name, s.author, s.bpm, s.notes, s.musicOffset, s.size, s.notePreload, s.screenSize); if (s != null) { Texture2D tex = bundle.LoadAsset <Texture2D> (s.cover); gameSheet.music = Application.persistentDataPath + "/Bundle/" + s.music + ".mp4"; gameSheet.cover = tex; } return(gameSheet); }