Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        /// <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);
        }