Package rekit.logic

Interface Model

All Known Implementing Classes:
GameModel

public interface Model
This Interface defines the Model for the MVC.
Author:
Dominik Fuchss
  • Method Details

    • getModel

      static Model getModel()
      Get the model.
      Returns:
      the model
    • getPlayer

      Player getPlayer()
      Get the Player.
      Returns:
      the player or null when not in Model.GameState.INGAME
    • getMenu

      MenuItem getMenu()
      Get the Menu.
      Returns:
      the menu or null when not in Model.GameState.MENU
    • start

      void start()
      Start the model.
    • end

      void end()
      End the model.
    • getScene

      IScene getScene()
      Get the current scene. The scene to be drawn.
      Returns:
      the currently active scene
    • getState

      Model.GameState getState()
      Get the current state.
      Returns:
      the state
    • setFilter

      void setFilter(Filter f)
      Set a filter.
      Parameters:
      f - the filter
    • removeFilter

      void removeFilter()
      Remove all filters.
    • getFilter

      Filter getFilter()
      Get the current filter and reset filterChanged().
      Returns:
      the filter or null if none set
    • filterChanged

      boolean filterChanged()
      Indicates whether the filter has been changed.
      Returns:
      true if changed, false otherwise
    • registerTestScene

      void registerTestScene(Function<GameModel,ILevelScene> constructor)
      Register a special testscene for debugging.
      Parameters:
      constructor - the constructor
    • getTestSceneConstructor

      Function<GameModel,ILevelScene> getTestSceneConstructor()
      Get the special testscene's constructor.
      Returns:
      the constructor if set