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.
|
2023-10-13 00:04:43 +00:00
|
|
|
@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.
|
2023-10-13 00:04:43 +00:00
|
|
|
##
|
|
|
|
## 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
|
|
|
|
|
2023-10-13 00:04:43 +00:00
|
|
|
## 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
|