display Deck
This commit is contained in:
parent
5007d7aa2a
commit
c6ec75e768
13
Deck.gd
13
Deck.gd
|
@ -1,4 +1,4 @@
|
|||
extends Node
|
||||
extends Node2D
|
||||
|
||||
var HanafudaCard = preload("res://HanafudaCard.tscn")
|
||||
|
||||
|
@ -64,7 +64,18 @@ onready var cards = [
|
|||
HanafudaCard.instance().init_card(Enums.Month.DECEMBER, Enums.Type.SCRAP_3),
|
||||
]
|
||||
|
||||
var card_order = []
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
init_card_order()
|
||||
for c in cards:
|
||||
add_child(c)
|
||||
|
||||
var card: HanafudaCard = cards[0]
|
||||
card.reveal(true)
|
||||
|
||||
func init_card_order() -> void:
|
||||
card_order.resize(cards.size())
|
||||
for i in range(cards.size()):
|
||||
card_order[i] = i
|
||||
|
|
|
@ -14,9 +14,10 @@ func _ready() -> void:
|
|||
$Frontside.texture = load(texture_path)
|
||||
reveal(revealed)
|
||||
|
||||
func init_card(month_: int, type_: int) -> void:
|
||||
func init_card(month_: int, type_: int) -> HanafudaCard:
|
||||
month = month_
|
||||
type = type_
|
||||
return self
|
||||
|
||||
func card_texture() -> String:
|
||||
var m := ""
|
||||
|
|
Loading…
Reference in a new issue