Moved everything into a file system. Links broken.
This commit is contained in:
52
scripts/game_manager.gd
Normal file
52
scripts/game_manager.gd
Normal file
@@ -0,0 +1,52 @@
|
||||
extends Node
|
||||
|
||||
var player : Player = null
|
||||
var panel : GamePanel = null
|
||||
var quest_log : QuestLog = null
|
||||
var top_menu : TopMenu = null
|
||||
var active : bool = true
|
||||
var end_shift_confirmation : ConfirmationDialog
|
||||
var end_shift_confirm_template = preload("res://end_shift_confirmation.tscn")
|
||||
func _ready() -> void:
|
||||
DisplayServer.register_additional_output(self)
|
||||
end_shift_confirmation = end_shift_confirm_template.instantiate()
|
||||
add_child(end_shift_confirmation)
|
||||
#var file =FileAccess.open("res://name.txt",FileAccess.READ)
|
||||
#var text =file.get_line()
|
||||
#var nmnames = text.remove_chars(" ").split(",")
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
if active and Input.is_action_just_pressed("switch modes"):
|
||||
confirm_end_shift()
|
||||
|
||||
func add_quest_progress_bar(quest : Quest) -> void:
|
||||
panel.add_quest_progress_bar(quest)
|
||||
|
||||
func confirm_end_shift() -> void:
|
||||
end_shift_confirmation.popup_centered()
|
||||
|
||||
func setup_visitor_ui(spawner: VisitorSpawner)-> void:
|
||||
if panel:
|
||||
panel.connect_visitor_spawner(spawner)
|
||||
|
||||
func end_shift() -> void:
|
||||
active = false
|
||||
panel.switch_panel(active)
|
||||
var window = get_window()
|
||||
window.mode = Window.MODE_WINDOWED
|
||||
var size = DisplayServer.screen_get_size()
|
||||
window.content_scale_size = Vector2i(345,500)
|
||||
var wsize = window.get_size_with_decorations()
|
||||
window.position = Vector2i(size.x - 345, 25)
|
||||
window.transparent = true
|
||||
window.transparent_bg = true
|
||||
DisplayServer.window_set_flag(DisplayServer.WINDOW_FLAG_BORDERLESS, true)
|
||||
DisplayServer.window_set_flag(DisplayServer.WINDOW_FLAG_TRANSPARENT, true)
|
||||
Guild.hall.process_mode = Node.PROCESS_MODE_DISABLED
|
||||
top_menu.hide()
|
||||
panel.get_parent().global_position = Vector2i(5,5)
|
||||
window.size = Vector2i(345,500)
|
||||
panel.populate_quest_bars()
|
||||
|
||||
func notice(msg : String, time : float = 1) -> void:
|
||||
panel.notice(msg, time)
|
||||
Reference in New Issue
Block a user