Package dev.prozilla.pine.core.mod
Interface Mod
public interface Mod
Interface for application modifications (mods).
A mod has the possibility to inject logic before, after or during a step in the lifecycle of the application.
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
afterInput
(Input input, float deltaTime) Runs after the application has received input, every frame.default void
afterRender
(Renderer renderer) Runs after the application has been rendered, every frame.default void
afterUpdate
(float deltaTime) Runs after the application has received an update, every frame.default void
beforeInput
(Input input, float deltaTime) Runs before the application receives input, every frame.default void
beforeRender
(Renderer renderer) Runs before the application is rendered, every frame.default void
beforeUpdate
(float deltaTime) Runs before the application receives an update, every frame.default void
destroy()
Runs when the application is closed.default void
init
(Application application) Initializes this mod.
-
Method Details
-
init
Initializes this mod.- Parameters:
application
- The application this mod is being loaded into
-
beforeInput
Runs before the application receives input, every frame.- Parameters:
input
- System that handles inputdeltaTime
- Time between this frame and the previous one, in seconds
-
afterInput
Runs after the application has received input, every frame.- Parameters:
input
- System that handles inputdeltaTime
- Time between this frame and the previous one, in seconds
-
beforeUpdate
default void beforeUpdate(float deltaTime) Runs before the application receives an update, every frame.- Parameters:
deltaTime
- Time between this frame and the previous one, in seconds
-
afterUpdate
default void afterUpdate(float deltaTime) Runs after the application has received an update, every frame.- Parameters:
deltaTime
- Time between this frame and the previous one, in seconds
-
beforeRender
Runs before the application is rendered, every frame.- Parameters:
renderer
- System that handles rendering
-
afterRender
Runs after the application has been rendered, every frame.- Parameters:
renderer
- System that handles rendering
-
destroy
default void destroy()Runs when the application is closed.
-