Package mindustry.core
Class Logic
java.lang.Object
mindustry.core.Logic
- All Implemented Interfaces:
ApplicationListener
Logic module.
Handles all logic for entities and waves.
Handles game state events.
Does not store any game state itself.
This class should not call any outside methods to change state of modules, but instead fire events.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
dispose()
Called when theApplication
is destroyed.static void
boolean
void
play()
Adds starting items, resets wave time, and sets state to playing.static void
researched
(Content content) void
reset()
void
runWave()
static void
void
skipWave()
void
update()
Called when theApplication
should update itself.static void
updateGameOver
(Team winner) protected void
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, init, pause, resize, resume
-
Constructor Details
-
Logic
public Logic()
-
-
Method Details
-
play
public void play()Adds starting items, resets wave time, and sets state to playing. -
reset
public void reset() -
skipWave
public void skipWave() -
runWave
public void runWave() -
updateWeather
protected void updateWeather() -
sectorCapture
public static void sectorCapture() -
updateGameOver
-
gameOver
-
researched
-
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
-
update
public void update()Description copied from interface:ApplicationListener
Called when theApplication
should update itself.- Specified by:
update
in interfaceApplicationListener
-
isWaitingWave
public boolean isWaitingWave()- Returns:
- whether the wave timer is paused due to enemies
-