Add addons

This commit is contained in:
Joey Yakimowich-Payne 2023-01-03 16:53:53 -07:00
commit 3367bad24f
No known key found for this signature in database
GPG key ID: 6BFE655FA5ABD1E1
527 changed files with 36197 additions and 0 deletions

View file

@ -0,0 +1,38 @@
extends DialogicSubsystem
## Subsystem that manages showing and hiding style nodes.
####################################################################################################
## STATE
####################################################################################################
func clear_game_state():
change_style('')
func load_game_state():
change_style(dialogic.current_state_info.get('style'))
####################################################################################################
## MAIN METHODS
####################################################################################################
func change_style(style_name:String) -> void:
var style_found: bool = false
var last_style := ""
dialogic.current_state_info['style'] = style_name
for style_node in get_tree().get_nodes_in_group('dialogic_styles'):
if style_node.style_name == style_name:
style_node.show()
style_found = true
else:
if style_node.visible:
last_style = style_node.style_name
style_node.hide()
if (!style_found):
for style_node in get_tree().get_nodes_in_group('dialogic_styles'):
if style_node.style_name == last_style:
style_node.show()