using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class RythemSystem : MonoBehaviour { // music source public List notes; // input methods public List keyNotes; public List buttonNotes; // self public GameObject self; // note array public GameObject notePF; public List noteArray; public int mode; public int duration; private int noteCount; // Start is called before the first frame update void Start() { if (notes.Count!=keyNotes.Count|| buttonNotes.Count!=keyNotes.Count) { throw new UnityException("Note number mismatch!"); } noteCount = notes.Count; } // Update is called once per frame void Update() { for (int i=0;i().Play(duration); } }