Esempio n. 1
0
        protected override void UpdateState(ArmedState state)
        {
            if (!IsLoaded)
            {
                return;
            }

            base.UpdateState(state);

            ApproachCircle.FadeOut();
            glow.FadeOut(400);

            switch (state)
            {
            case ArmedState.Idle:
                Delay(osuObject.Duration + TIME_PREEMPT);
                FadeOut(TIME_FADEOUT);

                explosion?.Expire();
                explosion = null;
                break;

            case ArmedState.Miss:
                ring.FadeOut();
                circle.FadeOut();
                number.FadeOut();
                glow.FadeOut();

                explosion?.Expire();
                explosion = null;

                Schedule(() => Add(explosion = new HitExplosion((OsuJudgementInfo)Judgement)));

                FadeOut(800);
                break;

            case ArmedState.Hit:
                const double flash_in = 30;

                flash.FadeTo(0.8f, flash_in);
                flash.Delay(flash_in);
                flash.FadeOut(100);

                explode.FadeIn(flash_in);

                Schedule(() => Add(explosion = new HitExplosion((OsuJudgementInfo)Judgement)));

                Delay(flash_in, true);

                //after the flash, we can hide some elements that were behind it
                ring.FadeOut();
                circle.FadeOut();
                number.FadeOut();

                FadeOut(800);
                ScaleTo(Scale * 1.5f, 400, EasingTypes.OutQuad);
                break;
            }
        }
Esempio n. 2
0
        protected override void UpdateState(ArmedState state)
        {
            if (!IsLoaded)
            {
                return;
            }

            Flush(true); //move to DrawableHitObject
            ApproachCircle.Flush(true);

            double t = HitTime ?? osuObject.StartTime;

            Alpha = 0;

            //sane defaults
            ring.Alpha           = circle.Alpha = number.Alpha = glow.Alpha = 1;
            ApproachCircle.Alpha = 0;
            ApproachCircle.Scale = new Vector2(2);
            explode.Alpha        = 0;
            Scale = new Vector2(0.5f); //this will probably need to be moved to DrawableHitObject at some point.

            const float preempt = 600;

            const float fadein = 400;

            Delay(t - Time.Current - preempt, true);

            FadeIn(fadein);

            ApproachCircle.FadeIn(Math.Min(fadein * 2, preempt));
            ApproachCircle.ScaleTo(0.6f, preempt);

            Delay(preempt, true);

            ApproachCircle.FadeOut();

            glow.FadeOut(400);

            switch (state)
            {
            case ArmedState.Disarmed:
                Delay(osuObject.Duration + 200);
                FadeOut(200);

                explosion?.Expire();
                explosion = null;
                break;

            case ArmedState.Armed:
                const double flash_in = 30;

                flash.FadeTo(0.8f, flash_in);
                flash.Delay(flash_in);
                flash.FadeOut(100);

                explode.FadeIn(flash_in);

                Schedule(() => Add(explosion = new HitExplosion(Judgement.Hit300)));

                Delay(flash_in, true);

                //after the flash, we can hide some elements that were behind it
                ring.FadeOut();
                circle.FadeOut();
                number.FadeOut();

                FadeOut(800);
                ScaleTo(Scale * 1.5f, 400, EasingTypes.OutQuad);
                break;
            }
        }
Esempio n. 3
0
        private void judgement(DrawableHitObject h, JudgementInfo j)
        {
            HitExplosion explosion = new HitExplosion((OsuJudgementInfo)j, (OsuHitObject)h.HitObject);

            judgementLayer.Add(explosion);
        }