mirror of
https://github.com/JHDev2006/Super-Mario-Bros.-Remastered-Public.git
synced 2025-10-22 23:48:11 +00:00
improvements
This commit is contained in:
@@ -4,6 +4,7 @@ extends Block
|
||||
var ticking_down := false
|
||||
|
||||
func _ready() -> void:
|
||||
if item == null: return
|
||||
if item_amount == 10 and item.resource_path == "res://Scenes/Prefabs/Entities/Items/SpinningCoin.tscn" and is_instance_valid(Global.level_editor) == false:
|
||||
Global.log_warning("Coin Brick Block is wrong! please report!: " + name)
|
||||
|
||||
|
1
Scripts/Classes/CustomLevel.gd
Normal file
1
Scripts/Classes/CustomLevel.gd
Normal file
@@ -0,0 +1 @@
|
||||
extends Node
|
1
Scripts/Classes/CustomLevel.gd.uid
Normal file
1
Scripts/Classes/CustomLevel.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://c0kflqgd1w6sg
|
@@ -20,8 +20,8 @@ func _ready() -> void:
|
||||
$Platform/ScoreNoteSpawner.owner = $Platform
|
||||
|
||||
func _process(_delta: float) -> void:
|
||||
if not dropped:
|
||||
$Rope.size.y = platform.global_position.y - rope_top
|
||||
if not dropped and is_instance_valid($Rope):
|
||||
$Rope.size.y = $Platform.global_position.y - rope_top
|
||||
$Rope.global_position.y = rope_top
|
||||
|
||||
func _physics_process(delta: float) -> void:
|
||||
|
@@ -781,7 +781,7 @@ func enter_pipe(pipe: PipeArea, warp_to_level := true) -> void:
|
||||
await get_tree().create_timer(1, false).timeout
|
||||
if Global.current_game_mode == Global.GameMode.LEVEL_EDITOR or Global.current_game_mode == Global.GameMode.CUSTOM_LEVEL:
|
||||
LevelEditor.play_pipe_transition = true
|
||||
owner.transition_to_sublevel(pipe.target_sub_level)
|
||||
Global.transition_to_scene(NewLevelBuilder.sub_levels[pipe.target_sub_level])
|
||||
else:
|
||||
Global.transition_to_scene(pipe.target_level)
|
||||
|
||||
|
@@ -342,7 +342,7 @@ func clear_saved_values() -> void:
|
||||
lives = 3
|
||||
player_power_states = "0000"
|
||||
|
||||
func transition_to_scene(scene_path := "") -> void:
|
||||
func transition_to_scene(scene_path = "") -> void:
|
||||
Global.fade_transition = bool(Settings.file.visuals.transition_animation)
|
||||
if transitioning_scene:
|
||||
return
|
||||
@@ -355,7 +355,10 @@ func transition_to_scene(scene_path := "") -> void:
|
||||
%TransitionBlock.modulate.a = 1
|
||||
$Transition.show()
|
||||
await get_tree().create_timer(0.1, true).timeout
|
||||
get_tree().change_scene_to_file(scene_path)
|
||||
if scene_path is String:
|
||||
get_tree().change_scene_to_file(scene_path)
|
||||
elif scene_path is PackedScene:
|
||||
get_tree().change_scene_to_packed(scene_path)
|
||||
await get_tree().scene_changed
|
||||
await get_tree().create_timer(0.15, true).timeout
|
||||
if fade_transition:
|
||||
|
@@ -41,7 +41,6 @@ func handle_main_hud() -> void:
|
||||
if current_chara != Global.player_characters[0]:
|
||||
update_character_info()
|
||||
%CharacterIcon.get_node("Shadow").texture = %CharacterIcon.texture
|
||||
%ModernLifeCount.text = "*" + (str(Global.lives).pad_zeros(2) if Settings.file.difficulty.inf_lives == 0 else "∞")
|
||||
%CharacterIcon.visible = Global.current_game_mode != Global.GameMode.BOO_RACE
|
||||
%ModernLifeCount.visible = Global.current_game_mode != Global.GameMode.BOO_RACE
|
||||
var world_num := str(Global.world_num)
|
||||
@@ -82,6 +81,14 @@ func handle_modern_hud() -> void:
|
||||
%ModernTime.text = "⏲" + str(Global.time).pad_zeros(3)
|
||||
%ModernKeyCount.visible = KeyItem.total_collected > 0
|
||||
%ModernKeyAmount.text = "*" + str(KeyItem.total_collected).pad_zeros(2)
|
||||
if Global.current_game_mode == Global.GameMode.CUSTOM_LEVEL:
|
||||
$ModernHUD/TopLeft/LifeCount.hide()
|
||||
%DeathCountLabel.show()
|
||||
%DeathCountLabel.text = "☠*" + str(Global.total_deaths).pad_zeros(2)
|
||||
else:
|
||||
$ModernHUD/TopLeft/LifeCount.show()
|
||||
%DeathCountLabel.hide()
|
||||
%ModernLifeCount.text = "*" + (str(Global.lives).pad_zeros(2) if Settings.file.difficulty.inf_lives == 0 else "∞")
|
||||
if get_tree().get_first_node_in_group("Players") == null or Settings.file.difficulty.time_limit == 0:
|
||||
%ModernTime.text = "⏲---"
|
||||
|
||||
|
Reference in New Issue
Block a user