broken_seals/game/scripts/game_modules/ui_gui_child_module.gd

16 lines
322 B
GDScript

extends GameModule
class_name UIGuiChildModule
export(PackedScene) var scene : PackedScene
export(bool) var hide : bool = false
func on_request_instance(what : int, node : Node) -> void:
if what == DataManager.PLAYER_UI_INSTANCE:
var sc = scene.instance()
node.gui_base.add_child(sc)
if hide:
sc.hide()