extends Node # Player related universal vars replaced if config file under player is found. var player = "player" var health = 1000 var health_max = 1000 var stamina = 1000 var stamina_max = 1000 var mana = 1000 var mana_max = 1000 var lifeforce = 1000 var lifeforce_max = 1000 var xp = 0 var dead = false var respaun = false # Player inventory universal vars var pickup_item # A variable to hold the mouse sensitivity (so Player.gd can load it) var mouse_sensitivity = 8.0 # Task updates hand off var food_task = false # A variable to hold all of the respawn points in a level var respawn_points = null # UI items var ui_lock = false # Used to prevent player input while paused and dead. # Config file key bindings var keybind_filepath = "res://Player/keybinds.ini" var keybind_configfile var keybinds = {} # ------------------------------------ func _ready(): # Loads in the keybindings keybind_configfile = ConfigFile.new() if keybind_configfile.load(keybind_filepath) == OK: for key in keybind_configfile.get_section_keys("keybinds"): var key_value = keybind_configfile.get_value("keybinds", key) if str(key_value) != "": keybinds[key] = key_value else: keybinds[key] = null else: print("Keybinds Config File Not Found") player = "player" health = 1000 stamina = 1000 mana = 1000 lifeforce = 1000 xp = 0 if dead == true: dead = false respaun = true