extends Node

var character: Dictionary = {}

func set_character(data: Dictionary) -> void:
	character = data

func clear() -> void:
	character = {}

func get_coord() -> Vector2:
	var coord: Dictionary = character.get("coord", {})
	return Vector2(
		float(coord.get("x", 0)),
		float(coord.get("y", 0))
	)

func set_coord(coord: Vector2i) -> void:
	character["coord"] = {
		"x": coord.x,
		"y": coord.y
	}
