java.lang.Object
technology.sola.engine.core.Sola
technology.sola.engine.defaults.SolaWithDefaults
SolaWithDefaults extends
Sola
with some default behaviors that many games will find useful, such as default
physics configurations and rendering options. These can be enabled in the
onInit(DefaultsConfigurator)
method and configured further via the member instances
solaPhysics
solaGraphics
guiDocument
solaControls
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclass
DefaultsConfigurator provides methods for enabling various default functionality. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final SolaControls
TheSolaControls
instance for this Sola.Fields inherited from class technology.sola.engine.core.Sola
assetLoaderProvider, configuration, eventHub, keyboardInput, mouseInput, solaEcs
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
SolaWithDefaults
(SolaConfiguration configuration) Creates a SolaWithDefaults instance with desiredSolaConfiguration
. -
Method Summary
Modifier and TypeMethodDescriptionprotected GuiDocument
TheGuiDocument
instance for this Sola.protected void
onInit()
Method called to initialize the Sola.protected abstract void
onInit
(SolaWithDefaults.DefaultsConfigurator defaultsConfigurator) CallsSola.onInit()
while providing access to theSolaWithDefaults.DefaultsConfigurator
.protected void
Method called every frame to render the world.protected SolaGraphics
TheSolaGraphics
instance for this Sola.protected SolaPhysics
TheSolaPhysics
instance for this Sola.Methods inherited from class technology.sola.engine.core.Sola
onAsyncInit, onUpdate, platform
-
Field Details
-
solaControls
TheSolaControls
instance for this Sola. It can be used in place of other input related objects for convenience.
-
-
Constructor Details
-
SolaWithDefaults
Creates a SolaWithDefaults instance with desiredSolaConfiguration
.- Parameters:
configuration
- the configuration for the Sola
-
-
Method Details
-
onInit
CallsSola.onInit()
while providing access to theSolaWithDefaults.DefaultsConfigurator
.- Parameters:
defaultsConfigurator
- theDefaultsConfigurator
instance
-
onInit
protected void onInit()Description copied from class:Sola
Method called to initialize the Sola. -
onRender
Description copied from class:Sola
Method called every frame to render the world. -
solaGraphics
TheSolaGraphics
instance for this Sola. CallSolaWithDefaults.DefaultsConfigurator.useGraphics()
to configure.- Returns:
SolaGraphics
instance
-
solaPhysics
TheSolaPhysics
instance for this Sola. CallSolaWithDefaults.DefaultsConfigurator.usePhysics()
to configure.- Returns:
SolaPhysics
instance
-
guiDocument
TheGuiDocument
instance for this Sola. CallSolaWithDefaults.DefaultsConfigurator.useGui()
to configure.- Returns:
GuiDocument
instance
-