コード例 #1
0
ファイル: RunSummary.cs プロジェクト: michbla/GamJam2k21
        public void Render()
        {
            background.Render(Camera.GetScreenCenter());
            if (isSummary)
            {
                GAME_OVER.Render(Camera.GetScreenCenter());
                PLAYTIME.Render(Camera.GetScreenCenter());
                EXP.Render(Camera.GetScreenCenter());
                Exp.Render(Camera.GetScreenCenter());
                PlayTime.Render(Camera.GetScreenCenter());
            }
            else
            {
                SCOREBOARD.Render(Camera.GetScreenCenter());
                TIME_SCORE.Render(Camera.GetScreenCenter());
                Vector2 RankCanvasOffset;
                if (PositionInRanking >= 0 && PositionInRanking < 3)
                {
                    RankCanvasOffset = (0f, 0f + PositionInRanking);
                }
                else
                {
                    RankCanvasOffset = (0f, 4f);
                    rank.UpdateOffset((-7f, -2.5f));
                    Text dots = new Text((-7f, -1.5f), "...", TextType.ui, 0.5f);
                    dots.Render(Camera.GetScreenCenter());
                    rank.UpdateText(PositionInRanking + 1 + ": " + rankingLoader.GetRank(PositionInRanking));
                    rank.Render(Camera.GetScreenCenter());
                }

                RankCanvas.Render(Camera.GetScreenCenter() - RankCanvasOffset);
                for (int i = 0; i < 3; i++)
                {
                    rank.UpdateOffset((-7f, 1.5f - i));
                    rank.UpdateText(i + 1 + ": " + rankingLoader.GetRank(i));

                    rank.Render(Camera.GetScreenCenter());
                }
            }

            SummaryRankSwitchButton.Render(Camera.GetScreenCenter());
            ExitGameButton.Render(Camera.GetScreenCenter());
            NewGameButton.Render(Camera.GetScreenCenter());
        }
コード例 #2
0
ファイル: MainMenu.cs プロジェクト: michbla/GamJam2k21
        private void RenderLB()
        {
            Text SCOREBOARD = new Text((-7.5f, 3.5f), "SCOREBOARD", TextType.ui, 1.5f);
            Text TIME_SCORE = new Text((-7.2f, 2.5f), "TIME    SCORE", TextType.ui, 0.70f);
            Text rank       = new Text((-6f, 2.5f), " ", TextType.ui, 0.5f);

            background.Render(Camera.GetScreenCenter());
            SCOREBOARD.Render(Camera.GetScreenCenter());
            TIME_SCORE.Render(Camera.GetScreenCenter());
            for (int i = 0; i < 3; i++)
            {
                rank.UpdateOffset((-7f, 1.5f - i));
                rank.UpdateText(i + 1 + ": " + Rl.GetRank(i));

                rank.Render(Camera.GetScreenCenter());
            }
            back.Render(Camera.GetScreenCenter());
        }