
extends Node2D

var cursor_prefab = preload("res://scenes/cursor.scn")
var cursor
var hide_mouse = true

func _process(delta):
	cursor.set_pos(get_local_mouse_pos())

func _ready():
	if hide_mouse:
		Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN)
	cursor = cursor_prefab.instance()
	add_child(cursor)
#	if get_node("player") != null and get_node("level/player_spawn_point")!= null:
#	get_node("player").set_pos(get_node("level/player_spawn_point").get_pos())
	set_process(true)
