예제 #1
0
        public Song readSong(string band, string file)
        {
            string          path           = "Songs/" + band + "/" + file + "/";
            List <SongNote> notes          = MidiParser.readMidi(basePath + path + "player.mid");
            AudioClip       songBackground = Resources.Load <AudioClip>(path + "backing");
            AudioClip       hitNoise       = Resources.Load <AudioClip>(path + "instrument");

            return(new Song(notes, songBackground, hitNoise));
        }
예제 #2
0
        public Song readSong(string file)
        {
            string          path  = "Songs/" + file + "/";
            List <SongNote> notes = MidiParser.readMidi(basePath + path + "notes.mid");

            Debug.Log(MidiParser.readMidi(basePath + path + "notes.mid"));
            AudioClip songBackground = Resources.Load <AudioClip>(path + "background");
            AudioClip hitNoise       = Resources.Load <AudioClip>(path + "instrument");

            //Song test = Song(notes, songBackground, hitNoise);
            return(new Song(notes, songBackground, hitNoise, getDifficulty(notes)));
        }
예제 #3
0
        void Start()
        {
            song           = MidiParser.readMidi("Assets/Resources/Songs/HotCrossBunsLow.mid");
            songBackground = Resources.Load <AudioClip>("Songs/Megalovania");
            audio.clip     = songBackground;
            audio.Play();

            SongSetup songSetup = gameObject.GetComponent <SongSetup>();

            lanes         = songSetup.setupLanes();
            songStartTime = Time.time;
        }