Beispiel #1
0
        public ComboCounter(Player player)
        {
            this.player = player;

            s_hitCombo =
                new pSpriteText(GetComboString(), SkinManager.Current.FontScore, SkinManager.Current.FontScoreOverlap,
                                FieldTypes.Window, OriginTypes.TopLeft, ClockTypes.Game,
                                new Vector2(2, 465), 0.9F, true, Color.TransparentWhite);
            s_hitCombo.CurrentPosition.Y = 480 - s_hitCombo.MeasureText().Y *0.8f;
            s_hitCombo.StartPosition.Y   = 480 - s_hitCombo.MeasureText().Y *0.8f;
            s_hitCombo.CurrentScale      = 1.28F;

            s_hitCombo2 =
                new pSpriteText("0x", SkinManager.Current.FontScore, SkinManager.Current.FontScoreOverlap,
                                FieldTypes.Window, OriginTypes.TopLeft, ClockTypes.Game,
                                new Vector2(2, 465), 0.9F, true, Color.TransparentWhite);
            s_hitCombo2.CurrentPosition.Y = 480 - 8;
            s_hitCombo2.OriginPosition    = new Vector2(0, s_hitCombo2.MeasureText().Y *0.625f + 8);
            s_hitCombo2.CurrentScale      = 1.28F;

            if (!Player.Relaxing)
            {
                player.spriteManager.Add(s_hitCombo);
                player.spriteManager.Add(s_hitCombo2);
            }
        }
Beispiel #2
0
        internal ScoreDisplay(SpriteManager spriteManager, Vector2 position, bool alignRight, float scale, bool showScore, bool showAccuracy)
        {
            this.spriteManager = spriteManager;

            this.scale = scale;
            if (GameBase.Tournament)
            {
                scale *= 1.4f;
            }

            float vpos = position.Y;

            textMeasure = Vector2.Zero;

            if (showScore)
            {
                s_Score =
                    new pSpriteText(@"00000000", SkinManager.Current.FontScore, SkinManager.Current.FontScoreOverlap,
                                    alignRight ? Fields.TopRight : Fields.TopLeft, alignRight ? Origins.TopRight : Origins.TopLeft, Clocks.Game,
                                    new Vector2(0, 0), 0.95F, true, Color.White);
                s_Score.TextConstantSpacing = true;
                textMeasure      = s_Score.MeasureText() * 0.625f * scale;
                s_Score.Position = new Vector2(position.X, vpos);
                s_Score.Scale    = scale;

                vpos += textMeasure.Y;
            }

            if (SkinManager.UseNewLayout)
            {
                vpos += 3;
            }

            if (showAccuracy)
            {
                s_Accuracy =
                    new pSpriteText(@"00.00%", SkinManager.Current.FontScore, SkinManager.Current.FontScoreOverlap,
                                    alignRight ? Fields.TopRight : Fields.TopLeft, alignRight ? Origins.TopRight : Origins.TopLeft, Clocks.Game,
                                    new Vector2(0, 0), 0.95F, true, Color.White);
                s_Accuracy.Scale = scale * (showScore ? 0.6f : 1);
                s_Accuracy.TextConstantSpacing = true;
                s_Accuracy.Position            = new Vector2(position.X, vpos);

                LeftOfDisplay =
                    s_Accuracy.Position +
                    new Vector2(s_Accuracy.MeasureText().X * 0.625f * s_Accuracy.Scale + 24,
                                s_Accuracy.MeasureText().Y * 0.625f * s_Accuracy.Scale / 2);
            }


            if (!Player.Relaxing && !Player.Relaxing2)
            {
                spriteManager.Add(s_Score);
                spriteManager.Add(s_Accuracy);
            }
        }
Beispiel #3
0
        protected virtual void InitializeSprites()
        {
            SkinOsu skin     = SkinManager.Current;
            Vector2 position = new Vector2(2, 472);

            s_hitCombo =
                new pSpriteText(comboString, skin.FontCombo, skin.FontComboOverlap,
                                Fields.TopLeft, Origins.Custom, Clocks.Game,
                                position, 0.92f, true, Color.TransparentWhite);

            s_hitCombo.OriginPosition = new Vector2(0, s_hitCombo.MeasureText().Y * 0.625f + 9);

            s_hitCombo2 =
                new pSpriteText("0x", skin.FontCombo, skin.FontComboOverlap,
                                Fields.TopLeft, Origins.Custom, Clocks.Game,
                                position, 0.91f, true, Color.TransparentWhite);

            s_hitCombo2.OriginPosition = new Vector2(3, s_hitCombo2.MeasureText().Y * 0.625f + 9);
            s_hitCombo2.Additive       = true;

            s_hitCombo.Scale = s_hitCombo2.Scale = 1.28f;

            if (canDisplayCombo)
            {
                spriteManager.Add(s_hitCombo);
                spriteManager.Add(s_hitCombo2);
            }
        }
Beispiel #4
0
        internal ScoreDisplay(Vector2 position, bool alignRight, float scale, bool showScore, bool showAccuracy)
        {
            this.scale = scale;

            float vpos    = position.Y;
            float hOffset = 40 + GameBase.SuperWidePadding;

            textMeasure = Vector2.Zero;

            if (showScore)
            {
                s_Score =
                    new pSpriteText("000000", "score", 1,
                                    alignRight ? FieldTypes.StandardSnapRight : FieldTypes.Standard, alignRight ? OriginTypes.TopRight : OriginTypes.TopLeft, ClockTypes.Game,
                                    new Vector2(hOffset, 0), 0.95F, true, Color4.White);
                s_Score.TextConstantSpacing = true;
                s_Score.Position            = new Vector2(hOffset, vpos);
                s_Score.ScaleScalar         = scale;
                textMeasure = s_Score.MeasureText() * 0.625f * scale;

                vpos += textMeasure.Y + 4;
            }

            if (showAccuracy)
            {
                s_Accuracy =
                    new pSpriteText("00.00%", "score", 1,
                                    alignRight ? FieldTypes.StandardSnapRight : FieldTypes.Standard, alignRight ? OriginTypes.TopRight : OriginTypes.TopLeft, ClockTypes.Game,
                                    new Vector2(hOffset, 0), 0.95F, true, Color4.White);
                s_Accuracy.TextConstantSpacing = true;
                s_Accuracy.ScaleScalar         = scale * (showScore ? 0.7f : 1);
                s_Accuracy.Position            = new Vector2(hOffset - 35, vpos);
            }


            spriteManager.Add(s_Score);
            spriteManager.Add(s_Accuracy);
        }