Class ResourceBuilding
java.lang.Object
com.deco2800.game.components.Component
com.deco2800.game.components.infrastructure.ResourceBuilding
Resource building is a type of building used to generate resources for the player
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
Returns this building's production rategetType()
Returns this building's resource typevoid
updateProductionRate
(int productionRate) Updates this building's production rate to a new valueMethods inherited from class com.deco2800.game.components.Component
create, dispose, earlyUpdate, getEntity, setEnabled, setEntity, toString, triggerEarlyUpdate, triggerUpdate, update
-
Constructor Details
-
ResourceBuilding
-
-
Method Details
-
getProductionRate
public int getProductionRate()Returns this building's production rate- Returns:
- the production rate
-
updateProductionRate
public void updateProductionRate(int productionRate) Updates this building's production rate to a new value- Parameters:
productionRate
- the new production rate
-
getType
Returns this building's resource type- Returns:
- the resource type
-