コード例 #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
            });
        }
コード例 #2
0
ファイル: TestCaseTaikoPlayfield.cs プロジェクト: weebaka/osu
        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());
            }
        }
コード例 #3
0
        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);
            }
        }
コード例 #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));
        }
コード例 #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);
        }
コード例 #6
0
ファイル: TestSceneHits.cs プロジェクト: Azyyyyyy/osu
        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));
        }
コード例 #7
0
ファイル: TestCaseTaikoPlayfield.cs プロジェクト: weebaka/osu
        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));
            }
        }