khanat-client/ressources/scripts/global.gd

36 lines
582 B
GDScript3
Raw Normal View History

extends Node
var version = 0.0
var player_name = null
var ressource_queue = preload("res://ressources/scripts/resource_queue.gd").new()
enum RACE {
human
}
var race_label = [ "Humain" ]
func get_race_id( p_label ):
return race_label.find( p_label )
enum SEX {
female,
male
}
var sex_label = [ "Femme", "Homme" ]
func get_sex_id( p_label ):
return race_label.find( p_label )
enum CREATURES_EDITOR_MODE {
player,
npc
}
var creatures_editor_mode = CREATURES_EDITOR_MODE.player
func goto_scene( path ):
self.get_tree().get_root().get_node("main").goto_scene( path )