Class BaseEntity
java.lang.Object
me.arcademadness.omni_dungeon.entities.BaseEntity
- All Implemented Interfaces:
Entity
- Direct Known Subclasses:
MobEntity,PlayerEntity
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Accelerationprotected ActionPointsprotected Armorprotected Controllerprotected List<EntityPart>protected EnvironmentViewprotected Frictionprotected Healthprotected Inventoryprotected Locationprotected Manaprotected MaxSpeedprotected EntityPartprotected final Set<TileCoordinate>protected com.badlogic.gdx.math.Vector2 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the entity's acceleration attribute.Returns the entity's action points attribute.getArmor()Returns the entity's armor attribute.Returns the controller responsible for this entity.@Nullable EnvironmentViewReturns the entity's current view of the environment.Returns the entity's friction attribute.Returns the entity's health attribute.Returns the entity's inventory component.Returns the entity's location component.getMana()Returns the entity's mana attribute.Returns the entity's maximum speed attribute.Returns the set of tile coordinates currently occupied by this entity.Returns the root part of the entity's structure.com.badlogic.gdx.math.Vector2Returns the current velocity of the entity.voidsetController(Controller newController) Sets the controller responsible for this entity.voidsetEnvironment(EnvironmentView environment) Sets the entity's view of the environment.voidsetRootPart(EntityPart rootPart) Sets the root part of the entity's structure.voidsetVelocity(com.badlogic.gdx.math.Vector2 velocity) Sets the entity's velocity.
-
Field Details
-
health
-
armor
-
mana
-
actionPoints
-
inventory
-
location
-
controller
-
entityParts
-
environment
-
velocity
protected com.badlogic.gdx.math.Vector2 velocity -
acceleration
-
maxSpeed
-
friction
-
tileCoordinates
-
rootPart
-
-
Constructor Details
-
BaseEntity
public BaseEntity()
-
-
Method Details
-
getOccupiedTiles
Description copied from interface:EntityReturns the set of tile coordinates currently occupied by this entity.- Specified by:
getOccupiedTilesin interfaceEntity- Returns:
- a
SetofTileCoordinaterepresenting the occupied tiles
-
getHealth
Description copied from interface:EntityReturns the entity's health attribute. -
getArmor
Description copied from interface:EntityReturns the entity's armor attribute. -
getMana
Description copied from interface:EntityReturns the entity's mana attribute. -
getActionPoints
Description copied from interface:EntityReturns the entity's action points attribute.- Specified by:
getActionPointsin interfaceEntity- Returns:
- the
ActionPointsof the entity
-
getInventory
Description copied from interface:EntityReturns the entity's inventory component.- Specified by:
getInventoryin interfaceEntity- Returns:
- the
Inventoryof the entity
-
getLocation
Description copied from interface:EntityReturns the entity's location component.- Specified by:
getLocationin interfaceEntity- Returns:
- the
Locationof the entity
-
getController
Description copied from interface:EntityReturns the controller responsible for this entity.- Specified by:
getControllerin interfaceEntity- Returns:
- the
Controllercontrolling this entity
-
setController
Description copied from interface:EntitySets the controller responsible for this entity.- Specified by:
setControllerin interfaceEntity- Parameters:
newController- theControllerto assign to this entity
-
getVelocity
public com.badlogic.gdx.math.Vector2 getVelocity()Description copied from interface:EntityReturns the current velocity of the entity.- Specified by:
getVelocityin interfaceEntity- Returns:
- a
Vector2representing the entity's velocity
-
setVelocity
public void setVelocity(com.badlogic.gdx.math.Vector2 velocity) Description copied from interface:EntitySets the entity's velocity.- Specified by:
setVelocityin interfaceEntity- Parameters:
velocity- aVector2representing the new velocity
-
getAcceleration
Description copied from interface:EntityReturns the entity's acceleration attribute.- Specified by:
getAccelerationin interfaceEntity- Returns:
- the
Accelerationof the entity
-
getFriction
Description copied from interface:EntityReturns the entity's friction attribute.- Specified by:
getFrictionin interfaceEntity- Returns:
- the
Frictionof the entity
-
getMaxSpeed
Description copied from interface:EntityReturns the entity's maximum speed attribute.- Specified by:
getMaxSpeedin interfaceEntity- Returns:
- the
MaxSpeedof the entity
-
getRootPart
Description copied from interface:EntityReturns the root part of the entity's structure.- Specified by:
getRootPartin interfaceEntity- Returns:
- the
EntityPartrepresenting the root of the entity
-
setRootPart
Description copied from interface:EntitySets the root part of the entity's structure.- Specified by:
setRootPartin interfaceEntity- Parameters:
rootPart- theEntityPartto set as root
-
getEnvironment
Description copied from interface:EntityReturns the entity's current view of the environment.- Specified by:
getEnvironmentin interfaceEntity- Returns:
- the
EnvironmentViewassociated with this entity
-
setEnvironment
Description copied from interface:EntitySets the entity's view of the environment.- Specified by:
setEnvironmentin interfaceEntity- Parameters:
environment- theEnvironmentViewto associate with this entity
-