Language

onKeyPressed


onKeyPressed(KEY k)

Description

onKeyPressed() is a callback function called when the user pressed a key.

Parameters

k
The KEY pressed.

Examples

Mini boss

  1. function onKeyPressed(k)
  2.     if k == KEY_SPACE then
  3.         SpecialAttack() -- To implement
  4.     end
  5. end