示例#1
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");
 }