Class BenchConfig
java.lang.Object
com.csse3200.game.entities.configs.benches.BenchConfig
- Direct Known Subclasses:
ComputerBenchConfig
,HealthBenchConfig
,SpeedBenchConfig
-
Field Summary
FieldsModifier and TypeFieldDescriptionint
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
getPrice()
Gets the price of the stationvoid
Plays the upgrade soundvoid
subtractPrice
(Entity player) Subtracts the price of the station from the playerabstract void
Triggers the station's upgrade
-
Field Details
-
benchType
-
texturePath
-
promptText
-
price
public int price
-
-
Constructor Details
-
BenchConfig
public BenchConfig()
-
-
Method Details
-
subtractPrice
Subtracts the price of the station from the player- Parameters:
player
- the player
-
getPrice
public int getPrice()Gets the price of the station- Returns:
- the price of the station
-
playUpgradeSound
public void playUpgradeSound()Plays the upgrade sound -
upgrade
public abstract void upgrade(boolean playerNear, Entity player, com.badlogic.gdx.scenes.scene2d.ui.Label buyPrompt) Triggers the station's upgrade- Parameters:
playerNear
- is the player nearplayer
- the player EntitybuyPrompt
- the buyPrompt for the station
-