protected override void LoadComplete()
            {
                base.LoadComplete();

                sideTracker.MoveToY(1)
                .Then().MoveToY(0, 2000, easingFunction)
                .Then().Delay(200)
                .Loop();

                verticalTracker.MoveToY(1)
                .Then().MoveToY(0, 2000, easingFunction)
                .Then().Delay(200)
                .Loop();

                horizontalTracker.MoveToX(0)
                .Then().MoveToX(1, 2000)
                .Then().Delay(200)
                .Loop();
            }
Ejemplo n.º 2
0
        protected override void OnNewJudgement(JudgementResult judgement)
        {
            if (!judgement.IsHit || judgement.HitObject.HitWindows?.WindowFor(HitResult.Miss) == 0)
            {
                return;
            }

            if (!judgement.Type.IsScorable() || judgement.Type.IsBonus())
            {
                return;
            }

            if (judgementsContainer.Count > max_concurrent_judgements)
            {
                const double quick_fade_time = 100;

                // check with a bit of lenience to avoid precision error in comparison.
                var old = judgementsContainer.FirstOrDefault(j => j.LifetimeEnd > Clock.CurrentTime + quick_fade_time * 1.1);

                if (old != null)
                {
                    old.ClearTransforms();
                    old.FadeOut(quick_fade_time).Expire();
                }
            }

            judgementsContainer.Add(new JudgementLine
            {
                Y      = getRelativeJudgementPosition(judgement.TimeOffset),
                Origin = Anchor.CentreLeft,
            });

            arrow.MoveToY(
                getRelativeJudgementPosition(floatingAverage = floatingAverage * 0.9 + judgement.TimeOffset * 0.1)
                , arrow_move_duration, Easing.Out);
        }