예제 #1
0
        public BeatStats GetBeatStats(Interval interval)
        {
            BeatStats stats;

            if (allStats.TryGetValue(interval, out stats) == false)
            {
                stats = new BeatStats(this, interval);
                allStats.Add(interval, stats);
            }
            return(stats);
        }
예제 #2
0
        public void Unschedule(Interval interval, Action <BeatKeeper, BeatStats> action, bool repeatAction = false)
        {
            BeatStats stats = GetBeatStats(interval);

            if (repeatAction == true)
            {
                stats.OnRepeat -= action;
            }
            else
            {
                stats.OnOnce -= action;
            }
        }