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 Stringstatic final Stringstatic final Stringstatic final Stringintstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class com.deco2800.game.areas.GameArea
areaEntities, crystal, entityMapping, player, terrain -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreate()Create the game area, including terrain, static entities (trees), dynamic entities (player)voiddispose()Dispose of all internal entities in the areavoidexitShop()booleanisWallHere(com.badlogic.gdx.math.GridPoint2 pos) voidremoveEnvironmentalObject(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:
isWallHerein classGameArea
-
playShopMusic
public void playShopMusic() -
exitShop
public void exitShop() -
dispose
public void dispose()Description copied from class:GameAreaDispose of all internal entities in the area -
getEntityMapping
- Overrides:
getEntityMappingin classGameArea
-