private void Form1_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e) { if (e.KeyCode == Keys.Space) { TimerJump.Start(); } }
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; } }