Beispiel #1
0
 public void draw(Game1 game)
 {
     switch(game.state)
     {
         case Game1.STATE.MAIN:
             drawMain();
             break;
         case Game1.STATE.CREDITS:
             drawCredit();
             break;
         case Game1.STATE.INSTRUCTIONS:
             drawInstruction();
             break;
         case Game1.STATE.REGULAR:
             drawNormal(ref game);
             break;
         case Game1.STATE.ENDGAME:
             drawEnd(ref game);
             break;
         case Game1.STATE.PAUSED:
             drawPause(ref game);
             break;
     }
 }
Beispiel #2
0
        void drawEnd(ref Game1 game)
        {
            String msg;

            Game1.batch.Draw(textures[finalTextures[game.typeOfMax]], screen, Color.White);

            for (int i = 0; i < Collection.NUM_OF_PLAYERS; i++)
            {
                msg = "Player " + i + " ( " + Entity.colors.ElementAt(i).Value + " ) Score: " + game.Collection.Players[i].Score;
                fontRenderer.DrawText(Game1.batch, (int)FINAL_SCORE_DISPLACEMENT.X, (int)FINAL_SCORE_DISPLACEMENT.Y + (50 * i), msg);
            }

            labels[0].Draw();
        }
Beispiel #3
0
 void drawPause(ref Game1 game)
 {
     drawFloor();
     drawDisplay(game.state == Game1.STATE.PAUSED ? game.PauseTimer : game.RoundTimer, game.currentRound);
     drawTrails(game.Collection.Trails);
     drawEntities(game.Collection.Entities);
 }
Beispiel #4
0
 void drawNormal(ref Game1 game)
 {
     drawFloor();
     drawDisplay(game.RoundTimer, game.currentRound);
     drawEntities(game.Collection.Entities);
 }
Beispiel #5
0
 static void Main()
 {
     using (var game = new Game1())
         game.Run();
 }