// Use this for initialization void Start() { foreach (var instrument in InstrumentHelper.GetInstrumentList()) { var row = GetRowForInstrument(instrument); row.Init(InstrumentHelper.GetColorForInstrument(instrument)); } }
public void Update() { foreach (var instrument in InstrumentHelper.GetInstrumentList()) { CheckInstrument(instrument); } Input.ResetInputAxes(); }
private void Awake() { _score = this.transform.GetComponentInParent <Score>(); _rectTransform = (RectTransform)this.transform; _rowList = new List <Row>(); foreach (var instrument in InstrumentHelper.GetInstrumentList()) { var row = GetRowForInstrument(instrument); if (row != null) { _rowList.Add(row); } } }
public void Init(MeasureConfig config) { _rectTransform = (RectTransform)this.transform; _rowList = new List <Row>(); var instrumentList = InstrumentHelper.GetInstrumentList(); foreach (var instrument in instrumentList) { List <NoteConfig> noteList; if (!config.notes.TryGetValue(instrument, out noteList)) { noteList = new List <NoteConfig>(); } var row = Instantiate(rowPrefab, rowHolder); row.Init(InstrumentHelper.GetColorForInstrument(instrument), noteList); _rowList.Add(row); SetRowForInstrument(instrument, row); } }