Пример #1
0
        protected override void InitializeSpecifics()
        {
            Player.ScoreBoard.topLeft = new Vector2(GameBase.WindowManager.WidthScaled - 125, 120);

            foreach (ScoreboardEntry sbe in Player.ScoreBoard.Entries)
            {
                sbe.SpriteBackground.Texture        = TextureManager.Load(@"menu-button-background");
                sbe.SpriteBackground.OriginPosition = new Vector2(26, 20);
                sbe.SpriteBackground.OnClick       += spriteBackground_OnClick;
                sbe.SpriteBackground.HandleInput    = true;
                sbe.SpriteBackground.Tag            = sbe;
                sbe.SpriteBackground.HoverEffect    = new Transformation(sbe.SpriteBackground.InitialColour,
                                                                         Color.YellowGreen, 0, 100);
                if (sbe.name == GameBase.User.Name)
                {
                    ChatEngine.AddUserLog(string.Format(LocalisationManager.GetString(OsuString.Userlog_Multiplayer), sbe.rank, Player.ScoreBoard.Entries.Count, BeatmapManager.Current.DisplayTitleFull, OsuCommon.PlayModeString(Player.Mode)));
                }
            }

            Player.ScoreBoard.spriteManager.Alpha = 1;

            pText noMatches = new pText("Click a player tab to view their score! Hit F2 to export your replay.", 14
                                        , new Vector2(GameBase.WindowManager.WidthScaled, 60), Vector2.Zero, 1, true, Color.White, false)
            {
                TextAlignment    = Graphics.Renderers.TextAlignment.Right,
                Origin           = Origins.TopRight,
                ViewOffsetImmune = true
            };

            noMatches.TextBold = true;
            spriteManagerWideScrolling.Add(noMatches);

            startTime = GameBase.Time + 300;

            if (Player.ScoreBoard.trackingEntry != null)
            {
                Player.ScoreBoard.trackingEntry.SpriteBackground.Click();
            }

            pText pt =
                new pText(BeatmapManager.Current.DisplayTitle, 22, new Vector2(0, 0), Vector2.Zero, 0.991F, true,
                          Color.White, false);

            pt.ViewOffsetImmune = true;
            spriteManagerWideScrolling.Add(pt);

            pt =
                new pText("Beatmap by " + BeatmapManager.Current.Creator, 16, new Vector2(1, 20), Vector2.Zero, 0.991F,
                          true, Color.White, false);
            pt.ViewOffsetImmune = true;
            spriteManagerWideScrolling.Add(pt);

            pt = new pText("Match played at " + score.Date.ToString("yy/MM/dd hh:mm:ss", GameBase.nfi), 16, new Vector2(1, 34), Vector2.Zero,
                           0.991F, true, Color.White, false);
            pt.ViewOffsetImmune = true;
            spriteManagerWideScrolling.Add(pt);

            if (!MatchSetup.Match.TeamMode && Player.ScoreBoard.Entries.Count > 1 && Player.ScoreBoard.Entries[0].score != Player.ScoreBoard.Entries[1].score) //don't display in a tied situation.
            {
                pTexture winner   = ((ScoreboardEntryExtended)Player.ScoreBoard.Entries[0]).SpriteAvatar.Texture;
                pSprite  winnerBg = new pSprite(TextureManager.Load(@"ranking-winner"), new Vector2(395, 10), 0.4f, true, Color.White);
                spriteManagerWideScrolling.Add(winnerBg);
                if (winner != null)
                {
                    pSprite largeAvatar = new pSprite(winner, Origins.Centre, new Vector2(457.5f, 89f), 0.41f, true, Color.White);
                    largeAvatar.Scale = 185F / Math.Max(largeAvatar.Width, largeAvatar.Height);
                    spriteManagerWideScrolling.Add(largeAvatar);
                    largeAvatar.MoveToRelative(new Vector2(0, 200), 2000, EasingTypes.Out);
                    largeAvatar.FadeInFromZero(1500);
                }

                winnerBg.MoveToRelative(new Vector2(0, 200), 2000, EasingTypes.Out);
                winnerBg.FadeInFromZero(1500);
            }
        }