Class DeltaEngine
java.lang.Object
javafx.application.Application
fr.r1r0r0.deltaengine.model.engines.DeltaEngine
public final class DeltaEngine
extends javafx.application.Application
Launcher of the Engine, allows to initialize the Engine, and returns the KernelEngine when needed
-
Nested Class Summary
Nested classes/interfaces inherited from class javafx.application.Application
javafx.application.Application.Parameters
-
Field Summary
Fields Modifier and Type Field Description private static KernelEngine
kernelEngine
Fields inherited from class javafx.application.Application
STYLESHEET_CASPIAN, STYLESHEET_MODENA
-
Constructor Summary
Constructors Constructor Description DeltaEngine()
-
Method Summary
Modifier and Type Method Description static KernelEngine
getKernelEngine()
Retrieves the Kernel of DeltaEngine.static KernelEngine
launch()
DeltaEngine launcher.(package private) static void
showEngineError(java.lang.Exception e)
Used to print engine errors(package private) static void
showKernelCriticalError(java.lang.Exception e)
Used to print critical engine errorsvoid
start(javafx.stage.Stage primaryStage)
The main entry point for all JavaFX applications.void
stop()
Methods inherited from class javafx.application.Application
getHostServices, getParameters, getUserAgentStylesheet, init, launch, launch, notifyPreloader, setUserAgentStylesheet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
kernelEngine
-
-
Constructor Details
-
DeltaEngine
public DeltaEngine()
-
-
Method Details
-
start
public void start(javafx.stage.Stage primaryStage) throws java.lang.ExceptionThe main entry point for all JavaFX applications. The start method is called after the init method has returned, and after the system is ready for the application to begin running.NOTE: This method is called on the JavaFX Application Thread.
- Specified by:
start
in classjavafx.application.Application
- Parameters:
primaryStage
- the primary stage for this application, onto which the application scene can be set. Applications may create other stages, if needed, but they will not be primary stages.- Throws:
java.lang.Exception
- if something goes wrong
-
stop
public void stop()- Overrides:
stop
in classjavafx.application.Application
-
launch
DeltaEngine launcher. Main entry point of the Engine.
Once initialized and started, it will return the Kernel of the engine, allowing to fully manipulate the engine and develop your game.- Returns:
- KernelEngine The Core of the Engine
- Throws:
AlreadyInitializedException
- If DeltaEngine was previously launched- See Also:
to retrieve Kernel if DeltaEngine is already launched
-
getKernelEngine
Retrieves the Kernel of DeltaEngine. It must first has been launched before getting it.- Returns:
- KernelEngine Kernel of the DeltaEngine
- Throws:
NotInitializedException
- If DeltaEngine was not launched properly before.- See Also:
to launch DeltaEngine first before trying to retrieve Kernel
-
showKernelCriticalError
static void showKernelCriticalError(java.lang.Exception e)Used to print critical engine errors- Parameters:
e
- the exception
-
showEngineError
static void showEngineError(java.lang.Exception e)Used to print engine errors- Parameters:
e
- the exception
-