ð°ShopService
Service for adding and removing items from the shop.
Example usage:
Functions
getAllShopkeeperIds(): string[]
Returns all current shopkeepers (by ID) in the game.
spawnShopkeeper(shopType: "items" | "upgrade", position: Vector3): string
Creates an item shopkeeper or upgrade shopkeeper at the given position. Returns the ID (string) of the created shop.
despawnShopkeeper(shopId: string)
Deletes the shopkeeper with the given ID (string).
Adds an item to the shop for all players.
amount - The amount of the item received when purchased
costItem - The type of item needed to purchase the specified item
price - The amount of the cost item needed to purchase the specified item
removeItem(item: ItemType)
Removes the item from the shop for all players.
Last updated