Esempio n. 1
0
        private void addStrongHitJudgement(bool kiai)
        {
            HitResult hitResult = RNG.Next(2) == 0 ? HitResult.Good : HitResult.Great;

            var cpi = new ControlPointInfo();

            cpi.Add(0, new EffectControlPoint {
                KiaiMode = kiai
            });

            Hit hit = new Hit();

            hit.ApplyDefaults(cpi, new BeatmapDifficulty());

            var h = new DrawableTestHit(hit)
            {
                X = RNG.NextSingle(hitResult == HitResult.Good ? -0.1f : -0.05f, hitResult == HitResult.Good ? 0.1f : 0.05f)
            };

            ((TaikoPlayfield)drawableRuleset.Playfield).OnNewResult(h, new JudgementResult(new HitObject(), new TaikoJudgement())
            {
                Type = hitResult
            });
            ((TaikoPlayfield)drawableRuleset.Playfield).OnNewResult(new TestStrongNestedHit(h), new JudgementResult(new HitObject(), new TaikoStrongJudgement())
            {
                Type = HitResult.Great
            });
        }
Esempio n. 2
0
        private void addHitJudgement(bool kiai)
        {
            HitResult hitResult = RNG.Next(2) == 0 ? HitResult.Good : HitResult.Great;

            var cpi = new ControlPointInfo();

            cpi.EffectPoints.Add(new EffectControlPoint
            {
                KiaiMode = kiai
            });

            Hit hit = new Hit();

            hit.ApplyDefaults(cpi, new BeatmapDifficulty());

            var h = new DrawableTestHit(hit)
            {
                X = RNG.NextSingle(hitResult == HitResult.Good ? -0.1f : -0.05f, hitResult == HitResult.Good ? 0.1f : 0.05f)
            };

            ((TaikoPlayfield)rulesetContainer.Playfield).OnJudgement(h, new TaikoJudgement {
                Result = hitResult
            });

            if (RNG.Next(10) == 0)
            {
                ((TaikoPlayfield)rulesetContainer.Playfield).OnJudgement(h, new TaikoJudgement {
                    Result = hitResult
                });
                ((TaikoPlayfield)rulesetContainer.Playfield).OnJudgement(h, new TaikoStrongHitJudgement());
            }
        }
        private void addHitJudgement(bool kiai)
        {
            TaikoHitResult hitResult = RNG.Next(2) == 0 ? TaikoHitResult.Good : TaikoHitResult.Great;

            var cpi = new ControlPointInfo();

            cpi.EffectPoints.Add(new EffectControlPoint
            {
                KiaiMode = kiai
            });

            Hit hit = new Hit();

            hit.ApplyDefaults(cpi, new BeatmapDifficulty());

            var h = new DrawableTestHit(hit)
            {
                X         = RNG.NextSingle(hitResult == TaikoHitResult.Good ? -0.1f : -0.05f, hitResult == TaikoHitResult.Good ? 0.1f : 0.05f),
                Judgement = new TaikoJudgement
                {
                    Result      = HitResult.Hit,
                    TaikoResult = hitResult,
                    TimeOffset  = 0
                }
            };

            playfield.OnJudgement(h);

            if (RNG.Next(10) == 0)
            {
                h.Judgement.SecondHit = true;
                playfield.OnJudgement(h);
            }
        }
Esempio n. 4
0
        private void addRimHit(bool strong)
        {
            Hit h = new Hit
            {
                StartTime = drawableRuleset.Playfield.Time.Current + scroll_time,
                IsStrong  = strong
            };

            h.ApplyDefaults(new ControlPointInfo(), new BeatmapDifficulty());

            drawableRuleset.Playfield.Add(new DrawableRimHit(h));
        }
Esempio n. 5
0
        private Hit createHitAtCurrentTime(bool strong = false)
        {
            var hit = new Hit
            {
                IsStrong  = strong,
                StartTime = Time.Current + 3000,
            };

            hit.ApplyDefaults(new ControlPointInfo(), new BeatmapDifficulty());

            return(hit);
        }
Esempio n. 6
0
        private void addCentreHit(bool strong)
        {
            Hit h = new Hit
            {
                StartTime = DrawableRuleset.Playfield.Time.Current + scroll_time,
                IsStrong  = strong,
                Samples   = createSamples(HitType.Centre, strong)
            };

            h.ApplyDefaults(new ControlPointInfo(), new BeatmapDifficulty());

            DrawableRuleset.Playfield.Add(new DrawableHit(h));
        }
Esempio n. 7
0
        private void addCentreHit(bool strong)
        {
            Hit h = new Hit
            {
                StartTime = rulesetContainer.Playfield.Time.Current + scroll_time,
                IsStrong  = strong
            };

            h.ApplyDefaults(new ControlPointInfo(), new BeatmapDifficulty());

            if (strong)
            {
                rulesetContainer.Playfield.Add(new DrawableCentreHitStrong(h));
            }
            else
            {
                rulesetContainer.Playfield.Add(new DrawableCentreHit(h));
            }
        }