コード例 #1
0
ファイル: GameLevel.cs プロジェクト: mathiassamyn/UnfairMario
        public void Draw()
        {
            hero.Draw();
            for (int i = 0; i < map.Hoogte; i++)
            {
                for (int j = 0; j < map.Breedte; j++)
                {
                    if (spriteArray[j, i] != null)
                    {
                        spriteArray[j, i].Draw();
                    }
                }
            }
            for (int i = 0; i < rocketList.Count; i++)
            {
                rocketList[i].Draw();
            }
            video.Blit(coinCountSurface, new Point(video.Width - coinCountSurface.Width, 0));
            video.Blit(coinSingle, new Point(video.Width - coinCountSurface.Width - coinSingle.Width - 10, 0));
            if (hero.dead)
            {
                endText("You are dead", "Try again");
            }

            if (hero.win)
            {
                string menuOption = "Next level";
                if (level == 2)
                {
                    menuOption = "Menu";
                }
                endText("You win", menuOption);
            }
        }
コード例 #2
0
        public void titleDraw()
        {
            video.Fill(Color.White);

            video.Blit(title, new Point(250, 25));
            video.Blit(play, playPoint);
        }