Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move from meta data to persistent data #136

Merged
merged 1 commit into from
Nov 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions addons/top_down/scripts/game/PersistentData.gd
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ extends Node

@export var instance_resource_list:Array[InstanceResource]
@export var action_resource:ActionResource
## Hold any data. Main use is to keep resources in memory
@export var data:Dictionary

var is_preloaded:bool

Expand Down
2 changes: 1 addition & 1 deletion addons/top_down/scripts/ui/title_screen/GraphicsManager.gd
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ func _ready()->void:
graphics_resource.enable_resize_tracking(get_viewport())
graphics_resource.window_mode_changed.connect(update_label)
graphics_resource.load_resource()
get_tree().set_meta("graphics", graphics_resource)
PersistentData.data["graphics"] = graphics_resource

func toggle_fullscreen()->void:
graphics_resource.toggle_fullscreen()
Expand Down