extends Node2D # var _card_class = preload("res://card.gd") var field_scene = preload("res://field.tscn") var fields: Array[Node] = [] func _on_request_completed(result, response_code, headers, body): var json = JSON.parse_string(body.get_string_from_utf8()) print(json["name"]) # func _test_func(): # card.load_card() # print(card.card_id) # print(card.card_name) # print(card.card_type) # print(card.oracle_text) # Called when the node enters the scene tree for the first time. func _ready() -> void: # card = _card_class.new("d3f10f07-7cfe-4a6f-8de6-373e367a731b") # add_child(card) # card.cache_done.connect(_test_func) fields.append(field_scene.instantiate()) var colors: Array[Color] = [Color(1, 0, 1)] fields[0].set_colors(colors) add_child(fields[0]) # Called every frame. 'delta' is the elapsed time since the previous frame. func _process(delta: float) -> void: pass