public class WE
extends com.badlogic.gdx.Game
construct(java.lang.String, java.lang.String[])
The Wurfel Engine needs Java >1.7 and the API libGDX1.4.1Modifier and Type | Field and Description |
---|---|
static java.lang.String |
VERSION
The version of the Engine
|
Modifier and Type | Method and Description |
---|---|
static void |
construct(java.lang.String title,
java.lang.String[] args)
Create a new instance of the engine.
|
void |
create()
You don't have to manually call this method.
|
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 Configuration |
getCurrentConfig() |
static EngineView |
getEngineView() |
static GameplayScreen |
getGameplay()
should rarely used because allows global access
|
static WE |
getInstance()
Singleton method to get the only living instance.
|
static java.io.File |
getWorkingDirectory()
Returns the save file folder, wich is different on every OS.
|
static void |
initGame(Controller controller,
GameView view,
Configuration config)
Initialize the main game with you custom controller and view.
|
static boolean |
isFullscreen()
Check if the game is running in fullscreen.
|
static void |
launch()
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(MainMenuInterface mainMenu)
Pass the mainMenu which get's displayed when you call launch().
|
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 gameplayScreen you initialized with initGame(Controller controller, GameView view).
|
static void |
switchSetup(Controller controller,
GameView view)
Use this if you want to continue to use a different 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 delta)
updates and render the global things e.g. the console
|
public static final java.lang.String VERSION
public void create()
public static void setMainMenu(MainMenuInterface mainMenu)
mainMenu
- launch()
public static void construct(java.lang.String title, java.lang.String[] args)
title
- The title, which is displayed in the window.args
- launch parameters. For a list look in the wiki.public static void launch()
public static WE getInstance()
public static void initGame(Controller controller, GameView view, Configuration config)
controller
- view
- config
- 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 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 Configuration getCurrentConfig()
public static Console getConsole()
Console.add(java.lang.String)
to add messages to the console.public static EngineView getEngineView()
public static void updateAndRender(float delta)
delta
- time in mspublic static GameplayScreen getGameplay()