challenge-editor/scene/trade_card.gd
2024-10-02 18:35:48 +08:00

16 lines
402 B
GDScript

extends TextureRect
signal click
var discount:float=0
# Called when the node enters the scene tree for the first time.
var data:Dictionary
func set_item(item_data:Dictionary):
data=item_data
%face.texture=Global.get_texture(data["texture"])
%price.text="价格:"+str(int(data["price"]*discount))
func _on_trade_card_btn_spec_pressed() -> void:
click.emit()
pass # Replace with function body.