Esempio n. 1
0
 /// <summary>
 /// Point d’entrée principal pour l’application.
 /// </summary>
 static void Main(string[] args)
 {
     using (Game1 game = new Game1())
     {
         game.Run();
     }
 }
Esempio n. 2
0
 public void Draw(Game1 game, SpriteFont font)
 {
     Color color;
     if (!isSelect)
         color = Color.LawnGreen;
     else
         color = Color.Red;
     String drawText = text;
     if (variants != null)
         drawText += ": " + variants[selectedVariant];
     game.spriteBatch.DrawString(font, drawText, position - font.MeasureString(drawText) / 2, color);
 }
Esempio n. 3
0
 public Game(Game1 origin)
 {
     _origin = origin;
      _X = (_origin.graphics.PreferredBackBufferWidth / 2);
      _Y = (_origin.graphics.PreferredBackBufferHeight / 2);
      _map = new Tetris_color[12, 25];
      _random = new Random();
     new KeyValuePair<int, int>(0, 0);
     new Dictionary<KeyValuePair<int, int>, Tetris_color>();
     current = new piece[4];
     init_map();
     init_colors();
     init_list_of_piece();
     _score = 0;
     _lvl = 1;
     _flag = 0;
     _temp = 0;
     _end = false;
     _pause = false;
     choose_next_piece();
     for (int i = 0; i < 4; i++)
         current[i] = new piece(all_piece[next_piece][i]);
     choose_next_piece();
 }
Esempio n. 4
0
 public Help(Game1 origin)
 {
     _origin = origin;
      _X = (_origin.graphics.PreferredBackBufferWidth / 2);
      _Y = (_origin.graphics.PreferredBackBufferHeight / 2);
 }
Esempio n. 5
0
 public GamePage(string launchArguments)
 {
     _game = XamlGame<Game1>.Create(launchArguments, Window.Current.CoreWindow, this);
 }