public class WE
extends java.lang.Object
launch(java.lang.String, java.lang.String[])
The Wurfel Engine needs Java >= v1.8 and the API libGDX v1.5.6 (may work with older version).Modifier and Type | Field and Description |
---|---|
static CVarSystem |
CVARS
The CVar system used by the engine.
|
static java.lang.String |
VERSION
The version of the Engine
|
Constructor and Description |
---|
WE() |
Modifier and Type | Method and Description |
---|---|
void |
addIcon(java.lang.String internalPath) |
static boolean |
editorHasMapCopy() |
static <T> T |
getAsset(java.lang.String filename)
Get an asset from the asset manager
|
static com.badlogic.gdx.assets.AssetManager |
getAssetManager()
To load assets you can use getAsset(String filename)
|
static Console |
getConsole()
Returns the Console.
|
static java.lang.String |
getCredits()
Get the credits of the engine.
|
static EngineView |
getEngineView() |
static GameplayScreen |
getGameplay()
should rarely used because allows global access
|
static com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration |
getLwjglApplicationConfiguration()
returns the pointer to the LWJGL configuration of the game window.
|
static java.io.File |
getWorkingDirectory()
Returns the save file folder, wich is different on every OS.
|
static void |
initAndStartGame(Controller controller,
GameView view,
LoadingScreen customLoadingScreen)
Initialize the main game with you custom controller and view.
|
static boolean |
isFullscreen()
Check if the game is running in fullscreen.
|
static void |
launch(java.lang.String title,
java.lang.String[] args)
Start the engine.
|
static void |
loadEditor(boolean reverseMap)
Switch into the map editor
|
static void |
setFullscreen(boolean fullscreen)
You can switch to fullscreen.
|
static void |
setMainMenu(AbstractMainMenu mainMenu)
Pass the mainMenu which gets displayed when you call launch().
|
static void |
setScreen(WEScreen screen)
Set a screen as active.
|
static void |
showMainMenu()
Starts the actual game using the gameplayScreen you initialized with initGame(Controller controller, GameView view).
|
static void |
startGame()
Starts the actual game using the custom gameplayScreen.
|
static void |
switchSetup(Controller controller,
GameView view)
Use this if you want to continue to use already initialized controller and view.
|
static void |
switchSetupWithInit(Controller controller,
GameView view)
Use this if you want to use different controller and views.
|
static void |
updateAndRender(float dt)
updates and render the global things e.g. the console
|
public static final java.lang.String VERSION
public static final CVarSystem CVARS
public static void setMainMenu(AbstractMainMenu mainMenu)
mainMenu
- launch(java.lang.String, java.lang.String[])
public static void setScreen(WEScreen screen)
screen
- public void addIcon(java.lang.String internalPath)
public static void launch(java.lang.String title, java.lang.String[] args)
title
- The title, which is displayed in the window.args
- Wurfel Engine launch parameters. For a list look in the wiki.#setMainMenu(com.BombingGames.WurfelEngine.Core.MainMenuInterface)
public static com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration getLwjglApplicationConfiguration()
public static void initAndStartGame(Controller controller, GameView view, LoadingScreen customLoadingScreen)
controller
- view
- customLoadingScreen
- startGame()
public static void switchSetupWithInit(Controller controller, GameView view)
controller
- the new controllerview
- the new viewpublic static void switchSetup(Controller controller, GameView view)
controller
- the new controllerview
- the new viewpublic static void loadEditor(boolean reverseMap)
reverseMap
- reverse to the map at the point where you exited the editor?public static void startGame()
public static void showMainMenu()
public static final java.lang.String getCredits()
public static java.io.File getWorkingDirectory()
public static void setFullscreen(boolean fullscreen)
fullscreen
- public static <T> T getAsset(java.lang.String filename)
T
- filename
- the name of the filepublic static boolean isFullscreen()
public static com.badlogic.gdx.assets.AssetManager getAssetManager()
public static boolean editorHasMapCopy()
public static Console getConsole()
Console.add(java.lang.String)
to add messages to the console.public static EngineView getEngineView()
public static void updateAndRender(float dt)
dt
- time in mspublic static GameplayScreen getGameplay()