java.lang.Object
com.example.project.models.gameScreens.GameScreenModel
com.example.project.models.gameScreens.ShopModel
Shop Model.
-
Property Summary
PropertiesTypePropertyDescriptionjavafx.beans.property.ListProperty
<UpgradeTile> Current items in the shop row that you can buy.javafx.beans.property.ReadOnlyListProperty
<UpgradeTile> get what upgrades the player currently has. -
Field Summary
Fields inherited from class com.example.project.models.gameScreens.GameScreenModel
logger, session
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
canPurchase
(UpgradeTile tile) return true if session user can purchase the tile.javafx.beans.property.ListProperty
<UpgradeTile> Current items in the shop row that you can buy.void
exists shop and increments level requirement for the next level.javafx.beans.property.ReadOnlyListProperty
<UpgradeTile> get what upgrades the player currently has.void
purchase
(UpgradeTile tileClickedOn) purchase an item.void
create new shop items.
-
Property Details
-
currentShopItems
Current items in the shop row that you can buy.- See Also:
-
playersUpgrades
get what upgrades the player currently has.- See Also:
-
-
Constructor Details
-
ShopModel
Constructor- Parameters:
session
- game session.
-
-
Method Details
-
currentShopItemsProperty
Current items in the shop row that you can buy.- Returns:
- shop items.
-
regenerateShopItems
public void regenerateShopItems()create new shop items. -
playersUpgradesProperty
get what upgrades the player currently has.- Returns:
- returns the list of upgrades.
-
purchase
purchase an item. remove from shop, add to players items. and decrement players money.- Parameters:
tileClickedOn
- tile to buy.
-
canPurchase
return true if session user can purchase the tile.- Parameters:
tile
- tile to check.- Returns:
- returns value indicating if user can buy.
-
onNextLevelPressed
public void onNextLevelPressed()exists shop and increments level requirement for the next level.
-