mirror of
https://github.com/JHDev2006/Super-Mario-Bros.-Remastered-Public.git
synced 2025-10-22 07:28:14 +00:00
Merge pull request #196 from KirbyKid256/pulls/resource-pack-expansion
Resource Pack Expansion Pt.1 - Campaign Icons and Audio
This commit is contained in:
@@ -13,9 +13,15 @@ var old_campaign := ""
|
||||
@export var campaign := ["SMB1", "SMBLL", "SMBS", "SMBANN", "Custom"]
|
||||
|
||||
func _ready() -> void:
|
||||
update()
|
||||
Global.level_theme_changed.connect(update)
|
||||
get_starting_position()
|
||||
handle_visuals()
|
||||
|
||||
func update() -> void:
|
||||
for icon in campaign_icons:
|
||||
icon.atlas = $ResourceGetter.get_resource(icon.atlas)
|
||||
|
||||
func _process(_delta: float) -> void:
|
||||
if active:
|
||||
handle_input()
|
||||
|
@@ -59,8 +59,9 @@ func setup_visuals() -> void:
|
||||
var world_visited = (SaveManager.visited_levels.substr((idx + world_offset) * 4, 4) != "0000" or Global.debug_mode or idx == 0)
|
||||
if world_visited == false:
|
||||
level_theme = "Mystery"
|
||||
var resource_getter = ResourceGetter.new() #Is it safe to be making a new one of these per icon?
|
||||
i.get_node("Icon").region_rect = CustomLevelContainer.THEME_RECTS[level_theme]
|
||||
i.get_node("Icon").texture = CustomLevelContainer.ICON_TEXTURES[0 if (idx <= 3 or idx >= 8) and Global.current_campaign != "SMBANN" else 1]
|
||||
i.get_node("Icon").texture = resource_getter.get_resource(CustomLevelContainer.ICON_TEXTURES[0 if (idx <= 3 or idx >= 8) and Global.current_campaign != "SMBANN" else 1])
|
||||
i.get_node("Icon/Number").region_rect.position.y = clamp(NUMBER_Y.find(level_theme) * 12, 0, 9999)
|
||||
i.get_node("Icon/Number").region_rect.position.x = (idx + world_offset) * 12
|
||||
idx += 1
|
||||
|
Reference in New Issue
Block a user