void Start() { SetCurrentPlayerTemplateByIdx(0); MainCam = GameObject.Find("Main Camera"); barGen = GetComponent <BarGenerator> (); }
//数据 private void _onTick(Tick tick) { if (!mInstruments.Contains(tick.Instrument)) { return; } // BarGenerator generator; if (!GeneratorMap.TryGetValue(tick.Instrument, out generator)) { generator = new BarGenerator(tick.Instrument, BarSizeType.Min1); generator.OnBarTick += _onBarTick; GeneratorMap.Add(tick.Instrument, generator); } // mOnTick?.Invoke(tick); generator.addTick(tick); }