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 KernelEnginekernelEngineFields inherited from class javafx.application.Application
STYLESHEET_CASPIAN, STYLESHEET_MODENA -
Constructor Summary
Constructors Constructor Description DeltaEngine() -
Method Summary
Modifier and Type Method Description static KernelEnginegetKernelEngine()Retrieves the Kernel of DeltaEngine.static KernelEnginelaunch()DeltaEngine launcher.(package private) static voidshowEngineError(java.lang.Exception e)Used to print engine errors(package private) static voidshowKernelCriticalError(java.lang.Exception e)Used to print critical engine errorsvoidstart(javafx.stage.Stage primaryStage)The main entry point for all JavaFX applications.voidstop()Methods inherited from class javafx.application.Application
getHostServices, getParameters, getUserAgentStylesheet, init, launch, launch, notifyPreloader, setUserAgentStylesheetMethods 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:
startin 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:
stopin 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
-