java.lang.Object
technology.sola.engine.core.Sola
- Direct Known Subclasses:
SolaWithDefaults
Sola contains the core functionality needed to make a game. It is played via
SolaPlatform
.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AssetLoaderProvider
Used to load assets for the Sola to use.protected final SolaConfiguration
The configuration for this Solaprotected EventHub
TheEventHub
instance used by this Solaprotected KeyboardInput
Used to check current state of keyboard input.protected MouseInput
Used to check current state of mouse input.protected technology.sola.ecs.SolaEcs
TheSolaEcs
instance used by this Sola -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Sola
(SolaConfiguration configuration) Creates a Sola instance with desiredSolaConfiguration
. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
onAsyncInit
(Runnable completeAsyncInit) Method called if any asynchronous initialization is needed.protected abstract void
onInit()
Method called to initialize the Sola.protected abstract void
Method called every frame to render the world.protected void
onUpdate
(float deltaTime) Method called every frame to update the input and world state.protected SolaPlatform
platform()
-
Field Details
-
configuration
The configuration for this Sola -
solaEcs
protected technology.sola.ecs.SolaEcs solaEcsTheSolaEcs
instance used by this Sola -
eventHub
TheEventHub
instance used by this Sola -
keyboardInput
Used to check current state of keyboard input. -
mouseInput
Used to check current state of mouse input. -
assetLoaderProvider
Used to load assets for the Sola to use.
-
-
Constructor Details
-
Sola
Creates a Sola instance with desiredSolaConfiguration
.- Parameters:
configuration
- the configuration for the Sola
-
-
Method Details
-
onRender
Method called every frame to render the world.- Parameters:
renderer
- theRenderer
instance
-
onInit
protected abstract void onInit()Method called to initialize the Sola. -
onAsyncInit
Method called if any asynchronous initialization is needed. Call completeAsyncInit.run() when completed to continue starting the Sola.- Parameters:
completeAsyncInit
- the callback to notify the hosting platform initialization is complete
-
platform
- Returns:
- the
SolaPlatform
running this Sola.
-
onUpdate
protected void onUpdate(float deltaTime) Method called every frame to update the input and world state.- Parameters:
deltaTime
- the time since last update
-