Package com.deco2800.game.areas
Class ForestGameArea
java.lang.Object
com.deco2800.game.areas.GameArea
com.deco2800.game.areas.ForestGameArea
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable
Forest area for the demo game with trees, a player, and some enemies.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
int
static final String
static final String
static final String
static final String
static final String
static final String
Fields inherited from class com.deco2800.game.areas.GameArea
areaEntities, crystal, entityMapping, player, terrain
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
create()
Create the game area, including terrain, static entities (trees), dynamic entities (player)void
dispose()
Dispose of all internal entities in the areavoid
exitShop()
boolean
isWallHere
(com.badlogic.gdx.math.GridPoint2 pos) void
removeEnvironmentalObject
(com.badlogic.gdx.math.GridPoint2 removeTile) removes an entity at a specific tile coordinate goes through areaEntities to find entity in that position check if entity is an environment object put inside separate list first to avoid ConcurrentModificationExceptionMethods inherited from class com.deco2800.game.areas.GameArea
removeEntity, spawnEntity, spawnEntityAt
-
Field Details
-
TITLE_FONT
- See Also:
-
LARGE_FONT
- See Also:
-
SMALL_FONT
- See Also:
-
BUTTON_FONT
- See Also:
-
BLACK
- See Also:
-
WHITE
- See Also:
-
TERRAIN
- See Also:
-
BACKGROUND_MUSIC
- See Also:
-
BACKGROUND_SOUNDS
- See Also:
-
SHOP_MUSIC
- See Also:
-
count
public int count
-
-
Constructor Details
-
ForestGameArea
-
-
Method Details
-
create
public void create()Create the game area, including terrain, static entities (trees), dynamic entities (player) -
getPlayer
-
removeEnvironmentalObject
public ValueTuple<EnvironmentalComponent.ResourceTypes,Integer> removeEnvironmentalObject(com.badlogic.gdx.math.GridPoint2 removeTile) removes an entity at a specific tile coordinate goes through areaEntities to find entity in that position check if entity is an environment object put inside separate list first to avoid ConcurrentModificationException- Parameters:
removeTile
- The tile where environment entities is removed- Returns:
- a tuple containing resource type and its value
-
isWallHere
public boolean isWallHere(com.badlogic.gdx.math.GridPoint2 pos) - Overrides:
isWallHere
in classGameArea
-
playShopMusic
public void playShopMusic() -
exitShop
public void exitShop() -
dispose
public void dispose()Description copied from class:GameArea
Dispose of all internal entities in the area -
getEntityMapping
- Overrides:
getEntityMapping
in classGameArea
-