Skip to content
Harrison edited this page Apr 20, 2022 · 5 revisions

The love table contains all of the modules that WiiLÖVE offers. However, it is also a module itself. It has some pre-defined functions and callbacks that can be defined by the developer.

Functions

These are functions that relate to WiiLÖVE's status.

love.getVersion

Gets the current running version of WiiLÖVE.

major, minor, patch = love.getVersion()

  • number major
    • The major version of WiiLÖVE.
  • number minor
    • The minor version of WiiLÖVE.
  • number patch
    • The patch version of WiiLÖVE.

Callbacks

These are developer-defined functions that get called during different occasions at runtime.

love.load

Called exactly once at the beginning of the game.

love.load()

love.update

Used to update the state of the game every frame.

love.update(dt)

  • number dt
    • Time since the last update in seconds.

love.draw

Used to draw on the screen every frame.

love.draw()

love.homepressed

Triggered when the HOME button is pressed. The game will quit after this function runs unless the function returns an aborted status.

abort = love.homepressed()

  • boolean abort
    • Abort quitting. If true, do not quit the game.

love.wiimoteconnected

Called when a Wiimote is connected.

love.wiimoteconnected(wiimote)

  • Wiimote wiimote
    • The newly connected Wiimote.

love.wiimotedisconnected

Called when a Wiimote is disconnected.

love.wiimoteconnected(wiimote)

  • Wiimote wiimote
    • The now-disconnected Wiimote.
Clone this wiki locally