remove 'onready' on card value

This value should not be reinitialized upon entering the scene tree.
This commit is contained in:
Fabien Freling 2022-01-24 23:23:19 +01:00
parent d4e5a921d8
commit 528603f90d
2 changed files with 4 additions and 2 deletions

View file

@ -82,4 +82,5 @@ func draw_card() -> CardValue:
return null return null
var card_id = card_order[next_to_draw] var card_id = card_order[next_to_draw]
next_to_draw += 1 next_to_draw += 1
return card_id var card = cards[card_id]
return card

View file

@ -8,7 +8,8 @@ export var revealed: bool = true setget reveal
export(Enums.Month) var month: int setget _set_card_month export(Enums.Month) var month: int setget _set_card_month
export(Enums.Type) var type: int setget _set_card_type export(Enums.Type) var type: int setget _set_card_type
onready var value = CardValue.new(Enums.Month.JANUARY, Enums.Type.LIGHT) var value: CardValue = CardValue.new(Enums.Month.JANUARY, Enums.Type.LIGHT)
onready var _is_ready := true onready var _is_ready := true
# Called when the node enters the scene tree for the first time. # Called when the node enters the scene tree for the first time.