mirror of
https://github.com/JHDev2006/Super-Mario-Bros.-Remastered-Public.git
synced 2025-10-23 16:00:54 +00:00
stuff
This commit is contained in:
@@ -3,10 +3,12 @@ extends Node2D
|
||||
|
||||
@export var reset_on_delete := true
|
||||
@export var lock_camera := false
|
||||
@export var set_on_load := true
|
||||
|
||||
func _enter_tree() -> void:
|
||||
add_to_group("CameraLimits")
|
||||
Player.camera_right_limit = int(global_position.x)
|
||||
if set_on_load or is_node_ready():
|
||||
Player.camera_right_limit = int(global_position.x)
|
||||
|
||||
func _exit_tree() -> void:
|
||||
if reset_on_delete:
|
||||
|
@@ -58,8 +58,10 @@ func on_area_entered(area: Area2D) -> void:
|
||||
old_state = LevelPersistance.active_nodes.duplicate(true)
|
||||
unlocked_doors = Door.unlocked_doors.duplicate()
|
||||
Level.start_level_path = Global.current_level.scene_file_path
|
||||
if Global.current_game_mode == Global.GameMode.LEVEL_EDITOR or Global.current_game_mode == Global.GameMode.CUSTOM_LEVEL:
|
||||
if Global.current_game_mode == Global.GameMode.LEVEL_EDITOR:
|
||||
sublevel_id = Global.level_editor.sub_level_id
|
||||
elif Global.current_game_mode == Global.GameMode.CUSTOM_LEVEL:
|
||||
sublevel_id = Global.current_level.sublevel_id
|
||||
if Settings.file.difficulty.checkpoint_style == 2 and has_meta("is_flag"):
|
||||
if player.power_state.state_name == "Small":
|
||||
player.get_power_up("Big")
|
||||
|
@@ -1,16 +1,8 @@
|
||||
extends Node2D
|
||||
|
||||
func _enter_tree() -> void:
|
||||
hide()
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
hide()
|
||||
|
||||
func _physics_process(delta: float) -> void:
|
||||
hide()
|
||||
|
||||
func _ready() -> void:
|
||||
hide()
|
||||
update()
|
||||
|
||||
func update() -> void:
|
||||
visible = !LevelEditor.playing_level and Global.current_game_mode == Global.GameMode.LEVEL_EDITOR
|
||||
|
@@ -100,8 +100,17 @@ func _ready() -> void:
|
||||
$Timer.start()
|
||||
else:
|
||||
if NewLevelBuilder.sub_levels == [null, null, null, null, null]:
|
||||
Global.clear_saved_values()
|
||||
Global.reset_values()
|
||||
wait_for_build_completion()
|
||||
NewLevelBuilder.load_level(LevelEditor.level_file)
|
||||
transition()
|
||||
else:
|
||||
await get_tree().create_timer(0.1, false).timeout
|
||||
can_transition = true
|
||||
|
||||
func wait_for_build_completion() -> void:
|
||||
await NewLevelBuilder.level_building_complete
|
||||
can_transition = true
|
||||
|
||||
func handle_challenge_mode_transition() -> void:
|
||||
$BG/Control/LivesCount.hide()
|
||||
@@ -132,7 +141,6 @@ func transition() -> void:
|
||||
elif Global.current_game_mode != Global.GameMode.CUSTOM_LEVEL:
|
||||
Global.transition_to_scene(level_to_transition_to)
|
||||
else:
|
||||
await get_tree().create_timer(0.25, false).timeout
|
||||
Global.transition_to_scene(NewLevelBuilder.sub_levels[Checkpoint.sublevel_id])
|
||||
|
||||
func show_best_time() -> void:
|
||||
|
Reference in New Issue
Block a user