Пример #1
0
        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);
            }
        }
Пример #2
0
 public Measure(MeasureConfig config)
 {
     this.Config = config;
     this.Init(this.Config);
 }
Пример #3
0
 private void Init(MeasureConfig config)
 {
     this.DataType      = config.DataType;
     this.Name          = config.Name;
     this.MergeFunction = config.MergeFunction;
 }
Пример #4
0
 public MeasureBuilder()
 {
     _element = new MeasureConfig();
 }