2024-09-27 17:51:20 +08:00
|
|
|
extends TextureRect
|
|
|
|
|
|
|
|
class_name BasicMesSkinCard
|
|
|
|
signal click(skin:BasicMesSkinCard,ind:int)
|
|
|
|
var data:Dictionary
|
|
|
|
var index:int=0
|
|
|
|
var state:int=-2:
|
|
|
|
set(val):
|
|
|
|
if val!=state:
|
|
|
|
state=val
|
|
|
|
match val:
|
|
|
|
-1:
|
|
|
|
%lock.show()
|
|
|
|
%btn.disabled=true
|
|
|
|
0:
|
|
|
|
%lock.hide()
|
|
|
|
%btn.disabled=false
|
|
|
|
1:
|
|
|
|
%lock.hide()
|
|
|
|
%btn.disabled=true
|
|
|
|
|
|
|
|
|
|
|
|
pass
|
|
|
|
func set_data(_data:Dictionary):
|
|
|
|
data=_data
|
2024-10-04 18:08:33 +08:00
|
|
|
%skin_head.texture=Database.get_texture(data["skin_card_face"])
|
2024-09-27 17:51:20 +08:00
|
|
|
|
|
|
|
|
|
|
|
func _on_btn_pressed() -> void:
|
|
|
|
click.emit(self,index)
|
|
|
|
pass # Replace with function body.
|