extends Node

onready var signalManager := get_tree().root.get_child(0).get_node("%SignalManager")

#TODO Easteregg pls
var currency: = 0 setget set_currency
var deaths: = 0 setget set_deaths
var kills: = 0 setget set_kills
var frees: = 0 setget set_frees
# TODO Rename probs
var is_dead: = false setget set_dead

func reset() -> void:
	deaths = 0
	kills = 0
	currency = 0

func set_currency(value: int) -> void:
	currency = value
	signalManager.emit_signal("currency_updated")

func set_deaths(value: int) -> void:
	deaths = value

func set_kills(value: int) -> void:
	kills = value
	signalManager.emit_signal("kills_updated")

func set_frees(value: int) -> void:
	frees = value
	signalManager.emit_signal("frees_updated")

func set_dead(value: bool) -> void:
	is_dead = value
