1
Fork 0
mirror of https://github.com/Steffo99/swear-jar.git synced 2024-11-22 07:44:17 +00:00
swear-jar/game/shop_item.gd

45 lines
1.3 KiB
GDScript3
Raw Normal View History

2023-10-12 19:45:52 +00:00
extends Node
class_name ShopItem
## The name of the item to display in the shop.
@export var title_text: String
## The description of the item to display in the shop.
@export var description_text: String
## The cost of the item to display in the shop.
@export var cost_text: String
## The item type to collect to purchase the item.
##
## If null, counts the items' value.
@export var cost_tag: StringName
2023-10-12 19:45:52 +00:00
## The quantity of items to collect to purchase the item.
##
## If cost_tag is null, counts the items' value.
@export var cost_quantity: int
## The shape that the ghost should use to determine if the item's placement is valid.
##
## Concave shapes might have problems interacting with the placeable area.
##
## May be null if the purchase does not involve the placement of an item.
2023-10-12 19:45:52 +00:00
@export var placement_shape: Shape2D
## The texture that should be rendered when the ghost is placing this item.
##
## Will be made transparent and modulated to red by the ghost.
##
## May be null if the purchase does not involve the placement of an item.
@export var placement_texture: Texture2D
## The scene to instantiate when the purchase is complete.
##
## May be null if the purchase does not involve the placement of an item.
@export var placement_scene: PackedScene
2023-10-12 19:45:52 +00:00
## What to do when this item is purchased.
signal on_purchase