Example #1
0
 private void Form1_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
 {
     if (e.KeyCode == Keys.Space)
     {
         TimerJump.Start();
     }
 }
Example #2
0
        private void TimerJump_Tick(object sender, EventArgs e)
        {
            Character.Jump();

            if (Character.Jumped == true)//neu da jump roi thi tat timer
            {
                //if(AllowJump)
                //    Character.PicNhanVat.Top -= 40;
                TimerJump.Stop();
                AllowJump = false;
            }
        }