|
|
| WorkFactory (std::function< std::shared_ptr< Scene >()>) |
| |
| virtual void | onBackEvent () |
| | Gets called on Android's "back" gesture or when the Esc key is pressed.
|
| |
| virtual void | onQuitEvent () |
| | Gets called when the user closes the main window or quit() has been called.
|
| |
| virtual void | onControllerBack () |
| | Gets called when the "Back" button is pressed on any connected controller (Android only)
|
| |
| virtual void | onPauseEvent () |
| | Gets called when the main window loses focus or the app is put in the background.
|
| |
|
virtual void | onUnload () |
| | Gets called when the Work is deactivated by the main loop.
|
| |
|
virtual void | onFileDrop (const std::filesystem::path &) |
| | Called when a file has been dropped onto the window.
|
| |
|
virtual void | onControllersChanged () |
| | Whenever the return value of jngl::getConnectedControllers would change, this method gets called.
|
| |
|
| Job ()=default |
| | Does nothing.
|
| |
|
| Job (const Job &)=default |
| | Copy constructor.
|
| |
|
Job & | operator= (const Job &)=default |
| | Copy assignment.
|
| |
|
| Job (Job &&)=default |
| | Move constructor.
|
| |
|
Job & | operator= (Job &&)=default |
| | Move assignment.
|
| |
|
virtual | ~Job () |
| | Does nothing.
|
| |
|
| void | step () override |
| | Advance the game logic.
|
| |
| void | draw () const override |
| | Draw the game state.
|
| |
| void | onLoad () override |
| | Gets called when the Work is activated by the main loop.
|
| |
Definition at line 10 of file WorkFactory.hpp.
◆ step()
Advance the game logic.
This function gets called 60 times per second or whatever has been set by setStepsPerSecond().
- Note
- JNGL's main loop calls all Jobs' step() functions before the active Work's step()
Implements Job.
◆ draw()
Draw the game state.
As it isn't garuanteed that this function is called as often as Job::step, you shouldn't change any game state in it.
- Note
- JNGL's main loop calls all Jobs' draw() functions after the active Work's draw()
Implements Job.
◆ onLoad()
Gets called when the Work is activated by the main loop.
Reimplemented from Work.
The documentation for this class was generated from the following file: