Class App

Singleton object.

The main class for managing scenes and the viewport.

Functions

app_mt:get_current_scene () Get current scene.
app_mt:get_viewport () Get viewport dimensions.
app_mt:get_viewport_w () Get viewport width.
app_mt:get_viewport_h () Get viewport height.
app_mt:add_scene (name, scene) Add scene to the scene list.
app_mt:set_scene (name) Get scene from the scene list by the name.
app_mt:update (dt) Main update function.
app_mt:render () Main render function.
app_mt:handle_event (eventname) Handling any LOVE event.


Functions

app_mt:get_current_scene ()
Get current scene.

Returns:

    Scene object
app_mt:get_viewport ()
Get viewport dimensions.

Returns:

  1. number x
  2. number y
  3. number w
  4. number h
app_mt:get_viewport_w ()
Get viewport width.

Returns:

    number
app_mt:get_viewport_h ()
Get viewport height.

Returns:

    number
app_mt:add_scene (name, scene)
Add scene to the scene list.

Parameters:

  • name string
  • scene menori.Scene object
app_mt:set_scene (name)
Get scene from the scene list by the name.

Parameters:

Returns:

    menori.Scene object
app_mt:update (dt)
Main update function.

Parameters:

  • dt number
app_mt:render ()
Main render function.
app_mt:handle_event (eventname)
Handling any LOVE event. Redirects an event call to an overridden function in the active scene.

Parameters:

generated by LDoc 1.4.6 Last updated 2023-03-21 17:41:24