Example #1
0
    void Start()
    {
        SetCurrentPlayerTemplateByIdx(0);
        MainCam = GameObject.Find("Main Camera");

        barGen = GetComponent <BarGenerator> ();
    }
Example #2
0
        //数据
        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);
        }