コード例 #1
0
    /**
     * Metronomes
     */
    public static Metronome PlayMetronome(string name)
    {
        Metronome m = GetMetronome(name);

        m.Play();
        return(m);
    }
コード例 #2
0
    protected void StartSong(Song nextsong)
    {
        // TODO: clean up current song.

        // TODO: play next song.
        timer.LoadSong(nextsong);
        timer.Play();
    }
コード例 #3
0
 // Start is called before the first frame update
 void Start()
 {
     toLoad = new MusicMap();
     toLoad.audioFilename = "resistance";
     //toLoad.bpm = 30.0F;
     toLoad.bpm             = 37.0F;
     toLoad.offset          = 0.810810810810F;
     toLoad.beatsPerMeasure = 4;
     nome = GetComponent <Metronome>();
     nome.AddBeatListener(() => cube.SetActive(!cube.active));
     nome.LoadMap(toLoad);//Load a json from streaming assets. link to mp3 file
     nome.Play();
     Debug.Log("Done");
 }