コード例 #1
0
ファイル: Form1.cs プロジェクト: jugarucristi/SpeisInvaders
 private void Lasertimer_Tick(object sender, EventArgs e)
 {
     timerlaser--;
     if (timerlaser == 0)
     {
         instantalaser = false;
         Lasertimer.Stop();
     }
 }
コード例 #2
0
ファイル: Form1.cs プロジェクト: jugarucristi/SpeisInvaders
 private void keyisdown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.A)
     {
         stanga = true;
     }
     if (e.KeyCode == Keys.D)
     {
         dreapta = true;
     }
     if (e.KeyCode == Keys.Space && !apasat)
     {
         if (startjoc == true && instantalaser == false)
         {
             armalaser();
             instantalaser = true;
             timerlaser    = 1;
             Lasertimer.Start();
         }
     }
 }