Package com.csse3200.game.files
Class SaveGame.GameState
java.lang.Object
com.csse3200.game.files.SaveGame.GameState
- Enclosing class:
- SaveGame
Stores game state. Can be serialised/deserialised.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the ClimateController that is stored within the GameStateint
getDay()
Gets the day value stored in the GameStatecom.badlogic.gdx.utils.Array<Entity>
Gets the entities that are used in save/loadint
getHour()
Gets the hour value stored in the GameStateint
Gets the in game minute that is stored within the GameStateGets the MissionManager that is stored within the GameStatefloat
Gets the oxygenLevel value stored in the GameStatecom.badlogic.gdx.utils.Array<Entity>
Gets the entities that are used in save/loadGets the player entity stored in the GameStatecom.badlogic.gdx.utils.Array<Entity>
getTiles()
Gets the entities that are used in save/loadGets the Tractor entity stored within the GameStatevoid
setClimate
(ClimateController climate) Gets the ClimateController that is stored within the GameStatevoid
setDay
(int day) Sets the day value stored in the GameStatevoid
setEntities
(com.badlogic.gdx.utils.Array<Entity> entities) Sets the entities that are used in save/load (filtered by filterEntities() first)void
setHour
(int hour) Sets the hour value stored in the GameStatevoid
setMinute
(int minute) Gets the in game minute that is stored within the GameStatevoid
setMissions
(MissionManager missions) Gets the MissionManager that is stored within the GameStatevoid
setOxygenLevel
(float oxygenLevel) Sets the oxygenLevel value stored in the GameStatevoid
setPlaceables
(com.badlogic.gdx.utils.Array<Entity> placeables) Sets the entities that are used in save/load (filtered by filterPlaceables() first)void
Sets the player entity stored in the GameStatevoid
Sets the entities that are used in save/load (filtered by filterTiles() first)void
setTractor
(Entity tractor) Gets the Tractor entity stored within the GameState
-
Constructor Details
-
GameState
public GameState()
-
-
Method Details
-
getDay
public int getDay()Gets the day value stored in the GameState- Returns:
- the in game day as an int
-
setDay
public void setDay(int day) Sets the day value stored in the GameState- Parameters:
day
- the day to set GameState to store
-
getHour
public int getHour()Gets the hour value stored in the GameState- Returns:
- the in game hour as an int
-
setHour
public void setHour(int hour) Sets the hour value stored in the GameState- Parameters:
hour
- the hour to set GameState to store
-
getOxygenLevel
public float getOxygenLevel()Gets the oxygenLevel value stored in the GameState- Returns:
- the in game oxygenLevel as an int
-
setOxygenLevel
public void setOxygenLevel(float oxygenLevel) Sets the oxygenLevel value stored in the GameState- Parameters:
oxygenLevel
- the oxygenLevel to set GameState to store
-
getPlayer
Gets the player entity stored in the GameState- Returns:
- the player entity stored in the GameState
-
setPlayer
Sets the player entity stored in the GameState- Parameters:
player
- the player entity to store in the GameState
-
getEntities
Gets the entities that are used in save/load- Returns:
- All entities that are stored in the GameState that were not filtered out from filterEntities()
-
setEntities
Sets the entities that are used in save/load (filtered by filterEntities() first)- Parameters:
entities
- All entities in the game or at least a relevant subset of them
-
getTiles
Gets the entities that are used in save/load- Returns:
- All entities that are stored in the GameState that were not filtered out from filterTiles()
-
setTiles
Sets the entities that are used in save/load (filtered by filterTiles() first)- Parameters:
tiles
- All entities in the game or at least a relevant subset of them
-
getTractor
Gets the Tractor entity stored within the GameState- Returns:
- the tractor entity within the GameState, or null if none
-
setTractor
Gets the Tractor entity stored within the GameState- Parameters:
tractor
- the tractor entity within the GameState, or null if none
-
getClimate
Gets the ClimateController that is stored within the GameState- Returns:
- the ClimateController that is stored within the GameState
-
setClimate
Gets the ClimateController that is stored within the GameState- Parameters:
climate
- the ClimateController that is stored within the GameState
-
getMissions
Gets the MissionManager that is stored within the GameState- Returns:
- the MissionManager that is stored within the GameState
-
setMissions
Gets the MissionManager that is stored within the GameState- Parameters:
missions
- the MissionManager that is stored within the GameState
-
getMinute
public int getMinute()Gets the in game minute that is stored within the GameState- Returns:
- the in game minute that is stored within the GameState
-
setMinute
public void setMinute(int minute) Gets the in game minute that is stored within the GameState- Parameters:
minute
- the in game minute that is stored within the GameState
-
getPlaceables
Gets the entities that are used in save/load- Returns:
- All entities that are stored in the GameState that were not filtered out from filterPlaceables()
-
setPlaceables
Sets the entities that are used in save/load (filtered by filterPlaceables() first)- Parameters:
placeables
- All entities in the game or at least a relevant subset of them
-