Esempio n. 1
0
        private void load()
        {
            RelativeSizeAxes = Axes.Both;

            BorderColour    = Color4.White;
            BorderThickness = 1;

            Blending = BlendingParameters.Additive;

            Alpha   = 0.15f;
            Masking = true;

            if (!result.IsHit())
            {
                return;
            }

            InternalChildren = new[]
            {
                body = new Box
                {
                    RelativeSizeAxes = Axes.Both,
                }
            };

            updateColour();
        }
        private void load(OsuColour colours)
        {
            RelativeSizeAxes = Axes.Both;

            BorderColour    = Color4.White;
            BorderThickness = 1;

            Blending = BlendingParameters.Additive;

            Alpha   = 0.15f;
            Masking = true;

            if (!result.IsHit())
            {
                return;
            }

            bool isRim = (judgedObject.HitObject as Hit)?.Type == HitType.Rim;

            InternalChildren = new[]
            {
                new Box
                {
                    RelativeSizeAxes = Axes.Both,
                    Colour           = isRim ? colours.BlueDarker : colours.PinkDarker,
                }
            };
        }
Esempio n. 3
0
        private static void applyResult(HitResult result, ref ScoringValues scoringValues)
        {
            if (!result.IsScorable())
            {
                return;
            }

            if (result.IsBonus())
            {
                scoringValues.BonusScore += result.IsHit() ? Judgement.ToNumericResult(result) : 0;
            }
            else
            {
                scoringValues.BaseScore += result.IsHit() ? Judgement.ToNumericResult(result) : 0;
            }

            if (result.IsBasic())
            {
                scoringValues.CountBasicHitObjects++;
            }
        }
Esempio n. 4
0
 public void TestIsHit(HitResult hitResult, bool expectedReturnValue)
 {
     Assert.AreEqual(expectedReturnValue, hitResult.IsHit());
 }