Ejemplo n.º 1
0
        public void CalculateJudgeTimings()
        {
            JudgeTimings.Clear();
            int    u   = 0;
            double bpm = ArcTimingManager.Instance.CalculateBpmByTiming(Timing);

            if (bpm <= 0)
            {
                return;
            }
            double interval = 60000f / bpm / (bpm >= 255 ? 1 : 2);
            int    total    = (int)((EndTiming - Timing) / interval);

            if ((u ^ 1) >= total)
            {
                JudgeTimings.Add((int)(Timing + (EndTiming - Timing) * 0.5f));
                return;
            }
            int n = u ^ 1;
            int t = Timing;

            while (true)
            {
                t = (int)(Timing + n * interval);
                if (t < EndTiming)
                {
                    JudgeTimings.Add(t);
                }
                if (total == ++n)
                {
                    break;
                }
            }
        }
Ejemplo n.º 2
0
        public void CalculateJudgeTimings()
        {
            JudgeTimings.Clear();
            int    u   = 0;
            double bpm = ArcTimingManager.Instance.CalculateBpmByTiming(Timing, TimingGroup);

            bpm = Math.Abs(bpm);
            if (bpm == 0)
            {
                return;
            }
            double interval = 60000f / bpm / (bpm >= 255 ? 1 : 2) / ArcGameplayManager.Instance.TimingPointDensityFactor;
            int    total    = (int)((EndTiming - Timing) / interval);

            if ((u ^ 1) >= total)
            {
                JudgeTimings.Add((int)(Timing + (EndTiming - Timing) * 0.5f));
                return;
            }
            int n = u ^ 1;
            int t = Timing;

            while (true)
            {
                t = (int)(Timing + n * interval);
                if (t < EndTiming)
                {
                    JudgeTimings.Add(t);
                }
                if (total == ++n)
                {
                    break;
                }
            }
        }
Ejemplo n.º 3
0
 public override void Destroy()
 {
     base.Destroy();
     boxCollider = null;
     JudgeTimings.Clear();
 }