Package xyz.jeremynoesen.pseudo3d
Class Pseudo3D
java.lang.Object
javafx.application.Application
xyz.jeremynoesen.pseudo3d.Pseudo3D
public class Pseudo3D
extends javafx.application.Application
Starting point of all functions of Pseudo3D
-
Nested Class Summary
Nested classes/interfaces inherited from class javafx.application.Application
javafx.application.Application.Parameters
-
Field Summary
Fields inherited from class javafx.application.Application
STYLESHEET_CASPIAN, STYLESHEET_MODENA
-
Constructor Summary
Constructors Constructor Description Pseudo3D()
-
Method Summary
Modifier and Type Method Description static Scene
getActiveScene()
Get the active Pseudo3D Scenestatic javafx.scene.canvas.Canvas
getCanvas()
Get the main Canvasstatic float
getRenderDeltaTime()
Get the delta time for the previous iteration of the render loopstatic javafx.scene.Scene
getScene()
Get the JavaFX Scene the main Canvas is placed onstatic float
getTickDeltaTime()
Get the delta time for the previous iteration of the tick loopstatic boolean
isResizable()
Check if the main window is resizablestatic void
launch(int width, int height, float framerate, float tickSpeed, boolean fixedDeltaTime, boolean resizable, java.lang.String title)
Launch the instance of the Applicationstatic void
setActiveScene(Scene activeScene)
Set a new Pseudo3D Scene to be activestatic void
setPaused(boolean paused)
Pause or unpause the game loopsvoid
start(javafx.stage.Stage primaryStage)
Start the applicationvoid
stop()
Stop the ApplicationMethods 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
-
Constructor Details
-
Pseudo3D
public Pseudo3D()
-
-
Method Details
-
launch
public static void launch(int width, int height, float framerate, float tickSpeed, boolean fixedDeltaTime, boolean resizable, java.lang.String title)Launch the instance of the Application- Parameters:
width
- Width of windowheight
- Height of windowframerate
- Framerate for rendering in frames per secondtickSpeed
- Tick speed for physics in hertzfixedDeltaTime
- Whether the delta time is a fixed valueresizable
- Resizable statustitle
- Window title
-
start
public void start(javafx.stage.Stage primaryStage)Start the application- Specified by:
start
in classjavafx.application.Application
- Parameters:
primaryStage
- Primary Stage of the Application
-
stop
public void stop() throws java.lang.ExceptionStop the Application- Overrides:
stop
in classjavafx.application.Application
- Throws:
java.lang.Exception
- If stopping fails
-
setPaused
public static void setPaused(boolean paused)Pause or unpause the game loops- Parameters:
paused
- True to pause
-
getCanvas
public static javafx.scene.canvas.Canvas getCanvas()Get the main Canvas- Returns:
- Main Canvas
-
getScene
public static javafx.scene.Scene getScene()Get the JavaFX Scene the main Canvas is placed on- Returns:
- JavaFX Scene the main Canvas is placed on
-
isResizable
public static boolean isResizable()Check if the main window is resizable- Returns:
- True if the main window is resizable
-
getActiveScene
Get the active Pseudo3D Scene- Returns:
- Active Pseudo3D Scene
-
setActiveScene
Set a new Pseudo3D Scene to be active- Parameters:
activeScene
- Pseudo3D Scene
-
getTickDeltaTime
public static float getTickDeltaTime()Get the delta time for the previous iteration of the tick loop- Returns:
- Delta time in seconds
-
getRenderDeltaTime
public static float getRenderDeltaTime()Get the delta time for the previous iteration of the render loop- Returns:
- Delta time in seconds
-