Syötteet : funktiot

LEFTKEY


   KUVAUS

Palauttaa 1, jos vasenta nuolinäppäintä painetaan. Muutoin palautetaan nolla.

   KÄYTTÖ
LEFTKEY ()

Katso myös: RIGHTKEY, UPKEY, DOWNKEY

   ESIMERKKI
AddText "Use arrows to move..."

x=200:y=150

Repeat

    'update controls
    If LeftKey() Then x=x-1
    If RightKey() Then x=x+1
    If UpKey() Then y=y-1
    If DownKey() Then y=y+1

    'draw "player"
    Box x,y,10,10

    DrawScreen

Until EscapeKey()

<<TAKAISIN