Package com.csse3200.game.entities
Class PlaceableEntity
java.lang.Object
com.csse3200.game.entities.Entity
com.csse3200.game.entities.PlaceableEntity
- 
Field SummaryFields inherited from class com.csse3200.game.entities.Entitycomponents
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionintintgetWidth()This function uses the builder pattern to allow the programmer to make a placeable entity irremovablebooleanvoidplaced()This function is called when a PlaceableEntity is placed via the structure placement service.voidremoved()This function is called when a PlaceableEntity is removed via the structure placement service.voidThis function is called when a PlaceableEntity is going to be placed via the structure placement service.voidThis function is called when a PlaceableEntity is going to be removed via the structure placement service.Methods inherited from class com.csse3200.game.entities.EntityaddComponent, create, dispose, earlyUpdate, equals, getCenterPosition, getComponent, getComponents, getEntityType, getEvents, getGridPosition, getId, getPosition, getScale, hashCode, scaleHeight, scaleWidth, setEnabled, setEntityType, setPosition, setPosition, setPosition, setScale, setScale, toString, update
- 
Constructor Details- 
PlaceableEntitypublic PlaceableEntity(int width, int height) 
 
- 
- 
Method Details- 
getWidthpublic int getWidth()
- 
getHeightpublic int getHeight()
- 
irremovableThis function uses the builder pattern to allow the programmer to make a placeable entity irremovable- Returns:
- The placeable entity
 
- 
placedpublic void placed()This function is called when a PlaceableEntity is placed via the structure placement service. Override this method to implement specific functionality when placed.
- 
removedpublic void removed()This function is called when a PlaceableEntity is removed via the structure placement service. Override this method to implement specific functionality when removed.
- 
willPlacepublic void willPlace()This function is called when a PlaceableEntity is going to be placed via the structure placement service. Override this method to implement specific functionality when the entity is about to be placed.
- 
willRemovepublic void willRemove()This function is called when a PlaceableEntity is going to be removed via the structure placement service. Override this method to implement specific functionality when the entity is about to be removed.
- 
is_irremovablepublic boolean is_irremovable()
 
-