Package mindustry.core
Class Control
java.lang.Object
mindustry.core.Control
- All Implemented Interfaces:
ApplicationListener
,Loadable
Control module.
Handles all input, saving and keybinds.
Should not handle any logic-critical state.
This class is not created in the headless server.
-
Field Summary
Modifier and TypeFieldDescription -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Automatically unlocks things with no requirements and no locked parents.void
dispose()
Called when theApplication
is destroyed.void
init()
Called when theApplication
is first created.boolean
void
void
pause()
Called when theApplication
is paused, usually when it's not active or visible on screen.void
void
void
playNewSector
(Sector origin, Sector sector, WorldReloader reloader) void
playSector
(Sector sector) void
playSector
(Sector origin, Sector sector) void
resume()
Called when theApplication
is resumed from a paused state, usually when it regains focus.void
setInput
(InputHandler newInput) void
update()
Called when theApplication
should update itself.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface arc.ApplicationListener
exit, fileDropped, resize
Methods inherited from interface arc.assets.Loadable
getDependencies, getName, loadSync
-
Field Details
-
saves
-
sound
-
input
-
indicators
-
-
Constructor Details
-
Control
public Control()
-
-
Method Details
-
loadAsync
public void loadAsync() -
checkAutoUnlocks
public void checkAutoUnlocks()Automatically unlocks things with no requirements and no locked parents. -
setInput
-
playMap
-
playMap
-
playSector
-
playSector
-
playNewSector
-
isHighScore
public boolean isHighScore() -
dispose
public void dispose()Description copied from interface:ApplicationListener
Called when theApplication
is destroyed. Preceded by a call toApplicationListener.pause()
.- Specified by:
dispose
in interfaceApplicationListener
-
pause
public void pause()Description copied from interface:ApplicationListener
Called when theApplication
is paused, usually when it's not active or visible on screen. An Application is also paused before it is destroyed.- Specified by:
pause
in interfaceApplicationListener
-
resume
public void resume()Description copied from interface:ApplicationListener
Called when theApplication
is resumed from a paused state, usually when it regains focus.- Specified by:
resume
in interfaceApplicationListener
-
init
public void init()Description copied from interface:ApplicationListener
Called when theApplication
is first created. Only gets called if the application is created before the listener is added.- Specified by:
init
in interfaceApplicationListener
-
update
public void update()Description copied from interface:ApplicationListener
Called when theApplication
should update itself.- Specified by:
update
in interfaceApplicationListener
-