2024-05-06 14:09:14 -04:00
|
|
|
extends Node2D
|
|
|
|
var config = ConfigFile.new()
|
|
|
|
|
|
|
|
# Called when the node enters the scene tree for the first time.
|
2024-05-07 21:32:08 -04:00
|
|
|
func _init():
|
2025-02-05 21:15:12 -05:00
|
|
|
|
|
|
|
if OS.is_debug_build():
|
2025-02-06 18:47:23 -05:00
|
|
|
Engine.set_time_scale(1)
|
2025-02-05 21:15:12 -05:00
|
|
|
|
2024-05-06 14:09:14 -04:00
|
|
|
if config.load("user://settings.cfg") == OK:
|
|
|
|
var player = load(config.get_value("gameplay", "class", "res://player-row.tscn")).instantiate()
|
|
|
|
player.position = Vector2(1920/2, 1080/2)
|
|
|
|
add_child(player)
|
2024-05-07 19:50:15 -04:00
|
|
|
|
2024-05-07 21:32:08 -04:00
|
|
|
func _ready():
|
|
|
|
$Music.volume_db = linear_to_db(config.get_value("config", "music_volume", 1))
|
2024-05-06 14:09:14 -04:00
|
|
|
|
|
|
|
|
|
|
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
|
|
func _process(delta):
|
|
|
|
pass
|