16 lines
No EOL
425 B
GDScript
16 lines
No EOL
425 B
GDScript
extends Control
|
|
|
|
onready var animation = $AnimationPlayer
|
|
|
|
func _card_selected(card: Card):
|
|
animation.play("fade ui card")
|
|
|
|
func _card_unselected(card: Card):
|
|
animation.play_backwards("fade ui card")
|
|
|
|
func show_card_menu(card):
|
|
var menu := PopupMenu.new()
|
|
menu.add_item("Flip", 0)
|
|
menu.connect("id_pressed", card, "_menu_action")
|
|
add_child(menu)
|
|
menu.popup(Rect2(get_viewport().get_mouse_position(), Vector2(100,10))) |