AppResidencia/empareja-las-sombras/scripts/game_data.gd

24 lines
501 B
GDScript

class_name GameData
extends Node
#Este script se encarga de comunicarse con la api
var all_residents = []
static var resident_playing = " "
static var start_time: int = 0
static var end_time: int = 0
static var fail_count: int = 0
static func start_game():
start_time = Time.get_unix_time_from_system()
fail_count = 0
static func end_game():
end_time = Time.get_unix_time_from_system()
static func add_fail():
fail_count += 1
static func get_duration() -> int:
return end_time - start_time