示例#1
0
    // Use this for initialization
    void Start()
    {
        rend     = GetComponent <Renderer>();
        holder   = musicObject.GetComponent <MusicHolder>();
        thisClip = holder.GetClip(notePosition);
        Debug.Log(thisClip);

        playing = false;
    }
示例#2
0
 public void OnPoint(bool down)
 {
     Settings.Note    = note;
     MusicSource.clip = holder.GetClip(notePosition);;
     if (down && !playing)
     {
         MusicSource.Play();
         playing = true;
     }
     else if (!down && playing)
     {
         MusicSource.Stop();
         playing = false;
     }
 }