Package dev.mikita.darkforest.model
Class GameModel
java.lang.Object
dev.mikita.darkforest.model.GameModel
The type Game model.
The main class responsible for the state of the game (game objects).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets current location.static GameModel
Gets instance.getItems()
Gets items.Gets monsters.Gets player.Gets portals.Gets sprite manager.Gets tile map.void
init
(boolean fromSave) Init.void
setLocation
(int locationId) Sets location.
-
Constructor Details
-
GameModel
public GameModel()
-
-
Method Details
-
init
public void init(boolean fromSave) Init.Initialization of the game world. Loading locations, game objects, etc.
- Parameters:
fromSave
- the from save
-
getInstance
Gets instance.- Returns:
- the instance
-
setLocation
public void setLocation(int locationId) Sets location.A method that allows you to change the location.
- Parameters:
locationId
- the location id
-
getTileMap
Gets tile map.- Returns:
- The tile map.
-
getMonsters
Gets monsters.- Returns:
- The monsters.
-
getItems
Gets items.- Returns:
- The items.
-
getPortals
Gets portals.- Returns:
- The portals.
-
getSpriteManager
Gets sprite manager.- Returns:
- The sprite manager.
-
getPlayer
Gets player.- Returns:
- The player.
-
getCurrentLocation
Gets current location.- Returns:
- The current location.
-