Package com.prineside.tdi2
Class Game
java.lang.Object
com.badlogic.gdx.Game
com.prineside.tdi2.Game
- All Implemented Interfaces:
ApplicationListener
- Direct Known Subclasses:
HeadlessReplayValidationGame,NormalGame
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal ActionResolverstatic final EventDispatcherGlobal event bus - static field to make sure listeners can be added even if the game has not started yet.static Game -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidstatic voidvoidcreate()Called when theApplicationis first created.voiddispose()Called when theApplicationis destroyed.static voidexit()static longlongstatic longstatic longstatic intbooleanbooleanstatic booleanisLoaded()Safe to call on any thread at any timevoidnotifyVisibleDisplayFrameChanged(int left, int right, int top, int bottom) Launcher calls this method in case some part of the screen is not visible (for example, a keyboard appears)voidpause()Called when theApplicationis paused, usually when it's not active or visible on-screen.voidrender()Called when theApplicationshould render itself.voidresize(int width, int height) Called when theApplicationis resized.voidresume()Called when theApplicationis resumed from a paused state, usually when it regains focus.
-
Field Details
-
i
-
EVENTS
Global event bus - static field to make sure listeners can be added even if the game has not started yet. -
preferencesManager
-
screenManager
-
abilityManager
-
achievementManager
-
analyticsManager
-
authManager
-
basicLevelManager
-
buffManager
-
cursorGraphics
-
dailyQuestManager
-
debugManager
-
enemyManager
-
gameValueManager
-
gateManager
-
httpManager
-
researchManager
-
itemManager
-
localeManager
-
leaderBoardManager
-
mapManager
-
messageManager
-
minerManager
-
modifierManager
-
networkManager
-
progressManager
-
purchaseManager
-
ratingManager
-
renderingManager
-
replayManager
-
resourceManager
-
assetManager
-
scriptManager
-
shapeManager
-
soundManager
-
statisticsManager
-
secretCodeManager
-
settingsManager
-
tileManager
-
towerManager
-
towerStatManager
-
triggeredActionManager
-
trophyManager
-
unitManager
-
uiManager
-
userMapManager
-
musicManager
-
managers
-
defaultSmallFuturaFont
-
actionResolver
-
gameSyncLoader
-
-
Constructor Details
-
Game
-
-
Method Details
-
checkConfiguredForProduction
public static void checkConfiguredForProduction() -
exit
public static void exit() -
isLoaded
public static boolean isLoaded()Safe to call on any thread at any time- Returns:
- true when all the managers are created and set up
-
isInMainThread
public boolean isInMainThread() -
assertInMainThread
public void assertInMainThread() -
create
public void create()Description copied from interface:com.badlogic.gdx.ApplicationListenerCalled when theApplicationis first created. -
pause
public void pause()Description copied from interface:com.badlogic.gdx.ApplicationListenerCalled when theApplicationis paused, usually when it's not active or visible on-screen. An Application is also paused before it is destroyed.- Specified by:
pausein interfaceApplicationListener- Overrides:
pausein classGame
-
resume
public void resume()Description copied from interface:com.badlogic.gdx.ApplicationListenerCalled when theApplicationis resumed from a paused state, usually when it regains focus.- Specified by:
resumein interfaceApplicationListener- Overrides:
resumein classGame
-
isDisposed
public boolean isDisposed() -
dispose
public void dispose()Description copied from interface:com.badlogic.gdx.ApplicationListenerCalled when theApplicationis destroyed. Preceded by a call toApplicationListener.pause().- Specified by:
disposein interfaceApplicationListener- Overrides:
disposein classGame
-
getRealTickCount
public static long getRealTickCount()- Returns:
- microseconds (1 / 1,000,000 s) (1 / 1,000 ms) since the start of the game
-
getTimestampSeconds
public static int getTimestampSeconds() -
getTimestampMillis
public static long getTimestampMillis() -
getMillisTillGameStart
public long getMillisTillGameStart() -
notifyVisibleDisplayFrameChanged
public void notifyVisibleDisplayFrameChanged(int left, int right, int top, int bottom) Launcher calls this method in case some part of the screen is not visible (for example, a keyboard appears)- Parameters:
left- offset from the sideright- offset from the sidetop- offset from the sidebottom- offset from the side
-
getVisibleDisplayFrame
- Returns:
- visible screen size, display scale. Values represent the number of pixels that are cut from each side of the screen.
-
render
public void render()Description copied from interface:com.badlogic.gdx.ApplicationListenerCalled when theApplicationshould render itself.- Specified by:
renderin interfaceApplicationListener- Overrides:
renderin classGame
-
resize
public void resize(int width, int height) Description copied from interface:com.badlogic.gdx.ApplicationListenerCalled when theApplicationis resized. This can happen at any point during a non-paused state but will never happen before a call toApplicationListener.create().- Specified by:
resizein interfaceApplicationListener- Overrides:
resizein classGame- Parameters:
width- the new width in pixelsheight- the new height in pixels
-
getFreeHeapSpaceSize
public static long getFreeHeapSpaceSize()
-