Package com.csse3200.game.services
Class StructurePlacementService
java.lang.Object
com.csse3200.game.services.StructurePlacementService
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanPlaceStructureAt(PlaceableEntity entity, com.badlogic.gdx.math.GridPoint2 tilePos) getStructureAt(com.badlogic.gdx.math.GridPoint2 position) com.badlogic.gdx.math.GridPoint2getStructurePosition(PlaceableEntity searchEntity) Gets the position of the given entity.voidplaceStructureAt(PlaceableEntity entity, com.badlogic.gdx.math.GridPoint2 tilePos, boolean centerX, boolean centerY) voidremoveStructureAt(com.badlogic.gdx.math.GridPoint2 tilePos) voidremoveStructureAt(com.badlogic.gdx.math.GridPoint2 tilePos, boolean force) voidreplaceStructureAt(PlaceableEntity entity, com.badlogic.gdx.math.GridPoint2 tilePos, boolean centerX, boolean centerY) voidspawnEntityAtVector(Entity entity, com.badlogic.gdx.math.Vector2 worldPos)
-
Constructor Details
-
StructurePlacementService
-
-
Method Details
-
getStructurePosition
Gets the position of the given entity.- Parameters:
searchEntity- - the entity to get the position of.- Returns:
- the position of the entity.
-
placeStructureAt
public void placeStructureAt(PlaceableEntity entity, com.badlogic.gdx.math.GridPoint2 tilePos, boolean centerX, boolean centerY) -
canPlaceStructureAt
public boolean canPlaceStructureAt(PlaceableEntity entity, com.badlogic.gdx.math.GridPoint2 tilePos) -
replaceStructureAt
public void replaceStructureAt(PlaceableEntity entity, com.badlogic.gdx.math.GridPoint2 tilePos, boolean centerX, boolean centerY) -
spawnEntityAtVector
-
removeStructureAt
public void removeStructureAt(com.badlogic.gdx.math.GridPoint2 tilePos) -
removeStructureAt
public void removeStructureAt(com.badlogic.gdx.math.GridPoint2 tilePos, boolean force) -
getStructureAt
-