Exemplo n.º 1
0
 public Form1()
 {
     SetStyle(ControlStyles.OptimizedDoubleBuffer |
              ControlStyles.AllPaintingInWmPaint |
              ControlStyles.UserPaint, true);
     InitializeComponent();
     this.BackColor = Color.Black;
     this.Size      = new Size(VALUES.WIDTH, VALUES.HEIGHT + VALUES.PLAYER_HEIGHT);
     if (false)
     {
         setup            = new Setup.LevelSetup();
         this.MouseClick += MousePop;
         this.KeyDown    += SetupKeyHandle;
     }
     InitializePlayer();
     StarMap.GenerateRandomMap(STAR_MAP_FILE, 150, currentPlayerTier);
     level = new StarMap(playerStar, STAR_MAP_FILE, new List <int> {
     }, PrepareNextLevel);
     level.Begin();
     PLAY();
     this.KeyUp    += KeyUps;
     this.Paint    += PaintGame;
     timer          = new Timer();
     timer.Interval = 100;
     timer.Tick    += new EventHandler(Elapse);
     timer.Start();
 }
Exemplo n.º 2
0
 private void PLAY()
 {
     setup            = null;
     this.KeyDown    -= SetupKeyHandle;
     this.MouseClick -= MousePop;
     this.KeyDown    += KeyHandle;
     this.MouseClick += LevelMouseHandle;
 }