Skip to content
ExamplesOpen editor ↗

TLASE_MOTSWI

→ DOWN_ARROW

The value standing for the down arrow key.

TLASE_MOTSWI

You hand it to taetsiETshwerwe. It is the string 'ArrowDown'.

Moving down means adding to y, because pebaY grows downwards:

fa (taetsiETshwerwe(TLASE_MOTSWI)) { y = y + 3; }

With GODIMO_MOTSWI, MOLEMA_MOTSWI and MOJA_MOTSWI it gives you the four directions for moving a shape around the canvas.

Up and down
diri y = 110;

tiro setaLoeto() {
  thalaKanefase(400, 220);
  tlhalosa('Khutlonne e e tsamayang kwa godimo le kwa tlase ka ditaetsi tsa metswi. Tobetsa setshwantsho pele.');
}

tiro tshwantsha() {
  bokamorago(238);
  tlogelaMothalo();
  tlatsaMmala(150, 110, 200);

  fa (taetsiETshwerwe(GODIMO_MOTSWI)) { y = y - 3; }
  fa (taetsiETshwerwe(TLASE_MOTSWI)) { y = y + 3; }

  thalaKhutlonne(170, thibela(y, 20, 180), 60, 30);
}

GODIMO_MOTSWI, MOLEMA_MOTSWI, MOJA_MOTSWI, taetsiETshwerwe