untap/player.gd

25 lines
703 B
GDScript

extends Node2D
var _card_class = preload("res://card.gd")
func _on_request_completed(result, response_code, headers, body):
var json = JSON.parse_string(body.get_string_from_utf8())
print(json["name"])
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
# TODO: Create 2-4 player instances as children of this tabletop node.
var card = _card_class.new("d3f10f07-7cfe-4a6f-8de6-373e367a731b")
add_child(card)
print(card.card_id)
print(card.card_name)
print(card.card_type)
print(card.oracle_text)
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass