Class Logic

java.lang.Object
mindustry.core.Logic
All Implemented Interfaces:
ApplicationListener

public class Logic extends Object implements 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 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

      public static void updateGameOver(Team winner)
    • gameOver

      public static void gameOver(Team winner)
    • researched

      public static void researched(Content content)
    • dispose

      public void dispose()
      Description copied from interface: ApplicationListener
      Called when the Application is destroyed. Preceded by a call to ApplicationListener.pause().
      Specified by:
      dispose in interface ApplicationListener
    • update

      public void update()
      Description copied from interface: ApplicationListener
      Called when the Application should update itself.
      Specified by:
      update in interface ApplicationListener
    • isWaitingWave

      public boolean isWaitingWave()
      Returns:
      whether the wave timer is paused due to enemies