Lutz T.: noch ein Feature & known bugs

Beitrag lesen

Hallo Andreas,

PS: Nicht nur spielen, auch mal ne Kritik schreiben. *g*

mit den Tasten n, m, a und y ist das etwas ungewohnt, die Pfeiltasten wären mir lieber, kannst Du das nicht einbauen?
Anbei die Funktion, die ich sonst für verschiedene Browser/Plattformen verwende, um die Pfeiltasten abzufragen:

function KeyDown(whichkey)
{ //alert(whichkey);
  if (whichkey == 37) Move(-1,0);
  if (whichkey == 38) Move(0,-1);
  if (whichkey == 39) Move(1,0);
  if (whichkey == 40) Move(0,1);

if (whichkey == 50) Move(0,1);
  if (whichkey == 52) Move(-1,0);
  if (whichkey == 53) Move(0,1);
  if (whichkey == 54) Move(1,0);
  if (whichkey == 56) Move(0,-1);

if (whichkey == 65458) Move(0,1);
  if (whichkey == 65460) Move(-1,0);
  if (whichkey == 65461) Move(0,1);
  if (whichkey == 65462) Move(1,0);
  if (whichkey == 65464) Move(0,-1);
}

Ich schaff nämlich sonst immmer nur eine Wurmlänge, die so kurz ist, daß es mir peinlich ist, den Wert in die Highscore-Liste einzutragen ;-(

Gruß, Lutz.