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:
- number x
- number y
- number w
- 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:
- name string
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:
- eventname string