27 lines
570 B
GDScript
27 lines
570 B
GDScript
extends Node
|
|
|
|
onready var deck = $Deck
|
|
onready var tween = $Tween
|
|
|
|
func _ready():
|
|
var dealer = oya()
|
|
|
|
func oya():
|
|
tween.start()
|
|
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)
|
|
|
|
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)
|
|
|
|
yield(tween, "tween_all_completed")
|
|
|
|
print("update oya")
|