hanafuda/Main.gd

27 lines
570 B
GDScript3
Raw Normal View History

2021-12-06 23:10:39 +01:00
extends Node
2021-12-13 23:38:36 +01:00
onready var deck = $Deck
onready var tween = $Tween
2021-12-06 23:10:39 +01:00
func _ready():
2021-12-14 13:22:44 +01:00
var dealer = oya()
2021-12-12 23:21:03 +01:00
2021-12-14 13:22:44 +01:00
func oya():
tween.start()
2021-12-13 23:38:36 +01:00
var card_1 = $Deck.card($Deck.draw_card())
card_1.show()
tween.interpolate_property(card_1, "position",
Vector2(0, 0), Vector2(100, 100), 3,
Tween.TRANS_LINEAR, Tween.EASE_IN_OUT)
2021-12-14 13:22:44 +01:00
var card_2 = $Deck.card($Deck.draw_card())
card_2.show()
tween.interpolate_property(card_2, "position",
Vector2(0, 0), Vector2(-100, 100), 0.4,
Tween.TRANS_LINEAR, Tween.EASE_IN_OUT)
2021-12-13 23:38:36 +01:00
2021-12-14 13:22:44 +01:00
yield(tween, "tween_all_completed")
2021-12-13 23:38:36 +01:00
2021-12-12 23:21:03 +01:00
print("update oya")