mirror of
https://github.com/JHDev2006/Super-Mario-Bros.-Remastered-Public.git
synced 2025-10-24 08:20:50 +00:00
Merge branch 'main' of https://github.com/JHDev2006/Super-Mario-Bros.-Remastered-Public
This commit is contained in:
@@ -253,13 +253,8 @@ position = Vector2(2624, -32)
|
|||||||
pipe_id = 3
|
pipe_id = 3
|
||||||
exit_only = true
|
exit_only = true
|
||||||
|
|
||||||
[node name="Checkpoint2" parent="." instance=ExtResource("10_q2h2g")]
|
|
||||||
position = Vector2(1296, 0)
|
|
||||||
optional = true
|
|
||||||
|
|
||||||
[node name="CheckpointFlag" parent="." instance=ExtResource("24_v8ufo")]
|
[node name="CheckpointFlag" parent="." instance=ExtResource("24_v8ufo")]
|
||||||
position = Vector2(1296, 0)
|
position = Vector2(1296, 0)
|
||||||
optional = true
|
|
||||||
|
|
||||||
[connection signal="block_destroyed" from="Tiles/BrickBlock" to="Tiles/BrickBlock/LevelPersistance" method="set_as_active_2"]
|
[connection signal="block_destroyed" from="Tiles/BrickBlock" to="Tiles/BrickBlock/LevelPersistance" method="set_as_active_2"]
|
||||||
[connection signal="block_emptied" from="Tiles/BrickBlock" to="Tiles/BrickBlock/LevelPersistance" method="set_as_active"]
|
[connection signal="block_emptied" from="Tiles/BrickBlock" to="Tiles/BrickBlock/LevelPersistance" method="set_as_active"]
|
||||||
|
|||||||
@@ -204,6 +204,7 @@ position = Vector2(2200, -136)
|
|||||||
[node name="CheckpointFlag" parent="." node_paths=PackedStringArray("nodes_to_delete") instance=ExtResource("22_686wu")]
|
[node name="CheckpointFlag" parent="." node_paths=PackedStringArray("nodes_to_delete") instance=ExtResource("22_686wu")]
|
||||||
position = Vector2(1328, 0)
|
position = Vector2(1328, 0)
|
||||||
nodes_to_delete = [NodePath("../Enemies/Blooper6")]
|
nodes_to_delete = [NodePath("../Enemies/Blooper6")]
|
||||||
|
optional = true
|
||||||
|
|
||||||
[node name="EntityGenerator" parent="." instance=ExtResource("22_lnx6r")]
|
[node name="EntityGenerator" parent="." instance=ExtResource("22_lnx6r")]
|
||||||
position = Vector2(-72, -176)
|
position = Vector2(-72, -176)
|
||||||
|
|||||||
@@ -236,6 +236,7 @@ position = Vector2(3432, -120)
|
|||||||
|
|
||||||
[node name="CheckpointFlag" parent="." instance=ExtResource("24_osugw")]
|
[node name="CheckpointFlag" parent="." instance=ExtResource("24_osugw")]
|
||||||
position = Vector2(2056, -64)
|
position = Vector2(2056, -64)
|
||||||
|
optional = true
|
||||||
|
|
||||||
[node name="BrickBlock" parent="." instance=ExtResource("21_u54v8")]
|
[node name="BrickBlock" parent="." instance=ExtResource("21_u54v8")]
|
||||||
position = Vector2(2040, -120)
|
position = Vector2(2040, -120)
|
||||||
|
|||||||
@@ -6,9 +6,6 @@ static var character_save := "Mario"
|
|||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
activated.get_node("ResourceSetterNew").resource_json = load(get_character_sprite_path(0))
|
activated.get_node("ResourceSetterNew").resource_json = load(get_character_sprite_path(0))
|
||||||
if Settings.file.difficulty.checkpoint_style == 0 and (Global.current_game_mode != Global.GameMode.LEVEL_EDITOR and Global.current_game_mode != Global.GameMode.CUSTOM_LEVEL) or Global.current_campaign == "SMBANN":
|
|
||||||
owner.queue_free()
|
|
||||||
return
|
|
||||||
owner.show()
|
owner.show()
|
||||||
if owner.passed:
|
if owner.passed:
|
||||||
sprite.hide()
|
sprite.hide()
|
||||||
|
|||||||
@@ -161,6 +161,8 @@ const ANIMATION_FALLBACKS := {
|
|||||||
"CrouchJump": "Crouch",
|
"CrouchJump": "Crouch",
|
||||||
"CrouchBump": "Bump",
|
"CrouchBump": "Bump",
|
||||||
"CrouchMove": "Crouch",
|
"CrouchMove": "Crouch",
|
||||||
|
"WaterCrouchMove": "CrouchMove",
|
||||||
|
"WingCrouchMove": "WaterCrouchMove",
|
||||||
"IdleAttack": "MoveAttack",
|
"IdleAttack": "MoveAttack",
|
||||||
"CrouchAttack": "IdleAttack",
|
"CrouchAttack": "IdleAttack",
|
||||||
"MoveAttack": "Attack",
|
"MoveAttack": "Attack",
|
||||||
@@ -247,7 +249,7 @@ func apply_character_physics(apply: bool) -> void:
|
|||||||
|
|
||||||
for i in get_tree().get_nodes_in_group("SmallCollisions"):
|
for i in get_tree().get_nodes_in_group("SmallCollisions"):
|
||||||
var hitbox_scale = json.get("small_hitbox_scale", [1, 1]) if apply else [1, 1]
|
var hitbox_scale = json.get("small_hitbox_scale", [1, 1]) if apply else [1, 1]
|
||||||
i.hitbox = Vector3(hitbox_scale[0], hitbox_scale[1] if i.get_meta("scalable", true) else 1, json.get("small_crouch_scale", 0.75) if apply else 0.5)
|
i.hitbox = Vector3(hitbox_scale[0], hitbox_scale[1] if i.get_meta("scalable", true) else 1, json.get("small_crouch_scale", 0.75) if apply else 0.75)
|
||||||
i._physics_process(0)
|
i._physics_process(0)
|
||||||
for i in get_tree().get_nodes_in_group("BigCollisions"):
|
for i in get_tree().get_nodes_in_group("BigCollisions"):
|
||||||
var hitbox_scale = json.get("big_hitbox_scale", [1, 1]) if apply else [1, 1]
|
var hitbox_scale = json.get("big_hitbox_scale", [1, 1]) if apply else [1, 1]
|
||||||
|
|||||||
@@ -221,13 +221,19 @@ func get_animation_name() -> String:
|
|||||||
return "CrouchJump"
|
return "CrouchJump"
|
||||||
elif player.is_actually_on_floor():
|
elif player.is_actually_on_floor():
|
||||||
if abs(player.velocity.x) >= 5 and not player.is_actually_on_wall():
|
if abs(player.velocity.x) >= 5 and not player.is_actually_on_wall():
|
||||||
return "CrouchMove"
|
if player.in_water:
|
||||||
elif player.in_water:
|
return "WaterCrouchMove"
|
||||||
return "WaterCrouch"
|
elif player.flight_meter > 0:
|
||||||
elif player.flight_meter > 0:
|
return "WingCrouchMove"
|
||||||
return "WingCrouch"
|
else:
|
||||||
|
return "CrouchMove"
|
||||||
else:
|
else:
|
||||||
return "Crouch"
|
if player.in_water:
|
||||||
|
return "WaterCrouch"
|
||||||
|
elif player.flight_meter > 0:
|
||||||
|
return "WingCrouch"
|
||||||
|
else:
|
||||||
|
return "Crouch"
|
||||||
if player.is_actually_on_floor():
|
if player.is_actually_on_floor():
|
||||||
if player.skidding:
|
if player.skidding:
|
||||||
return "Skid"
|
return "Skid"
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ func _enter_tree() -> void:
|
|||||||
LevelPersistance.active_nodes = old_state.duplicate(true)
|
LevelPersistance.active_nodes = old_state.duplicate(true)
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
if [Global.GameMode.CHALLENGE, Global.GameMode.MARATHON_PRACTICE].has(Global.current_game_mode) or Global.current_campaign == "SMBANN":
|
if [Global.GameMode.CHALLENGE, Global.GameMode.MARATHON_PRACTICE].has(Global.current_game_mode) or Global.current_campaign == "SMBANN" or (Settings.file.difficulty.extra_checkpoints == 0 and optional):
|
||||||
queue_free()
|
queue_free()
|
||||||
return
|
return
|
||||||
if has_meta("is_flag") == false:
|
if has_meta("is_flag") == false:
|
||||||
@@ -71,6 +71,3 @@ func get_id() -> String:
|
|||||||
return str(Global.level_editor.sub_level_id) + "," + str(Vector2i(global_position)) + "," + get_parent().name
|
return str(Global.level_editor.sub_level_id) + "," + str(Vector2i(global_position)) + "," + get_parent().name
|
||||||
else:
|
else:
|
||||||
return Global.current_level.scene_file_path + "," + str(Vector2i(global_position)) + "," + get_parent().name
|
return Global.current_level.scene_file_path + "," + str(Vector2i(global_position)) + "," + get_parent().name
|
||||||
|
|
||||||
func on_tree_exiting() -> void:
|
|
||||||
pass # Replace with function body.
|
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ extends Node2D
|
|||||||
|
|
||||||
const FLAG_POINTS := [100, 400, 800, 2000, 5000]
|
const FLAG_POINTS := [100, 400, 800, 2000, 5000]
|
||||||
|
|
||||||
|
const FLAG_POINTS_MODERN := [100, 200, 800, 4000, 8000]
|
||||||
|
|
||||||
signal player_reached
|
signal player_reached
|
||||||
|
|
||||||
signal sequence_begin
|
signal sequence_begin
|
||||||
@@ -42,8 +44,10 @@ func player_touch(player: Player) -> void:
|
|||||||
func give_points(player: Player) -> void:
|
func give_points(player: Player) -> void:
|
||||||
var value = clamp(int(lerp(0, 4, (player.global_position.y / -144))), 0, 4)
|
var value = clamp(int(lerp(0, 4, (player.global_position.y / -144))), 0, 4)
|
||||||
var nearest_value = FLAG_POINTS[value]
|
var nearest_value = FLAG_POINTS[value]
|
||||||
|
if Settings.file.difficulty.flagpole_lives:
|
||||||
|
nearest_value = FLAG_POINTS_MODERN[value]
|
||||||
$Score.text = str(nearest_value)
|
$Score.text = str(nearest_value)
|
||||||
if nearest_value == 5000 and Settings.file.difficulty.flagpole_lives and not [Global.GameMode.CHALLENGE, Global.GameMode.BOO_RACE].has(Global.current_game_mode) and not Settings.file.difficulty.inf_lives:
|
if nearest_value == 8000 and not [Global.GameMode.CHALLENGE, Global.GameMode.BOO_RACE].has(Global.current_game_mode) and not Settings.file.difficulty.inf_lives:
|
||||||
AudioManager.play_sfx("1_up", global_position)
|
AudioManager.play_sfx("1_up", global_position)
|
||||||
Global.lives += 1
|
Global.lives += 1
|
||||||
$ScoreNoteSpawner.spawn_one_up_note()
|
$ScoreNoteSpawner.spawn_one_up_note()
|
||||||
|
|||||||
Reference in New Issue
Block a user