Beispiel #1
0
        public Game(Song.Song s,

                    MIDI.Listener output,
                    TimeSource ts,
                    Display display
                    )
        {
            timeManager  = ts;
            this.display = display;
            this.output  = output;


            ts.Tempo = s.InitialTempo;
            foreach (Song.Event e in s.OtherEvents)
            {
                if (e is Song.TempoChangeEvent t1)
                {
                    ts.Schedule(e.Time, () => ts.Tempo = t1.NewTempo);
                }


                if (e is Song.OutputEvent o)
                {
                    ts.Schedule(e.Time, () => output.SendMessage(o.Output));
                }
            }

            judger = new Judgement.StandardJudger(s.JudgedEvents, ts, display);
        }
Beispiel #2
0
        public void Increment(int newCount)
        {
            overlayColor.A = (byte)OverlayOpacityBegin;
            newText        = newCount + "x";
            long delayedBloop = (long)Math.Round(t.Time / BloopDivision + 1) * BloopDivision;

            overlayBloop.Do2(t.Time, delayedBloop);

            //bloop on the next beet
            if (nextBloop != delayedBloop)
            {
                nextBloop = delayedBloop;
                t.Schedule(nextBloop, () =>
                {
                    oldText = newText;
                    counterBloop.Do(CounterBloopBegin, CounterBloopEnd);
                });
            }
        }