16 lines
402 B
GDScript3
16 lines
402 B
GDScript3
|
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.
|