mirror of
https://github.com/JHDev2006/Super-Mario-Bros.-Remastered-Public.git
synced 2025-12-05 19:20:19 -08:00
Compare commits
7 commits
f9017881e1
...
b5206d4e2d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b5206d4e2d | ||
|
|
aa5c50accb | ||
|
|
a30e359f4e | ||
|
|
f228ea51f6 | ||
|
|
bc73dc899b | ||
|
|
1e2d4d9404 | ||
|
|
b54c4b5913 |
12 changed files with 34 additions and 25 deletions
|
|
@ -334,4 +334,4 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -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)
|
||||||
|
|
|
||||||
|
|
@ -141,11 +141,14 @@ metadata/_custom_type_script = "uid://d4a7yp6e55u8t"
|
||||||
|
|
||||||
[node name="ScoreNoteSpawner" type="Node" parent="."]
|
[node name="ScoreNoteSpawner" type="Node" parent="."]
|
||||||
script = ExtResource("11_jkv5r")
|
script = ExtResource("11_jkv5r")
|
||||||
|
add_score = true
|
||||||
metadata/_custom_type_script = "uid://5octqlf4ohel"
|
metadata/_custom_type_script = "uid://5octqlf4ohel"
|
||||||
|
|
||||||
[connection signal="killed" from="." to="GibSpawner" method="summon_gib"]
|
[connection signal="killed" from="." to="GibSpawner" method="summon_gib"]
|
||||||
[connection signal="hammer_player_hit" from="EnemyPlayerDetection" to="." method="die_from_hammer"]
|
[connection signal="hammer_player_hit" from="EnemyPlayerDetection" to="." method="die_from_hammer"]
|
||||||
|
[connection signal="hammer_player_hit" from="EnemyPlayerDetection" to="ScoreNoteSpawner" method="spawn_note" binds= [200]]
|
||||||
[connection signal="invincible_player_hit" from="EnemyPlayerDetection" to="." method="die_from_object"]
|
[connection signal="invincible_player_hit" from="EnemyPlayerDetection" to="." method="die_from_object"]
|
||||||
|
[connection signal="invincible_player_hit" from="EnemyPlayerDetection" to="ScoreNoteSpawner" method="spawn_note" binds= [200]]
|
||||||
[connection signal="player_hit" from="EnemyPlayerDetection" to="." method="damage_player"]
|
[connection signal="player_hit" from="EnemyPlayerDetection" to="." method="damage_player"]
|
||||||
[connection signal="player_stomped_on" from="EnemyPlayerDetection" to="." method="damage_player"]
|
[connection signal="player_stomped_on" from="EnemyPlayerDetection" to="." method="damage_player"]
|
||||||
[connection signal="block_bounced" from="BlockBouncingDetection" to="." method="die_from_object"]
|
[connection signal="block_bounced" from="BlockBouncingDetection" to="." method="die_from_object"]
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,7 @@ region_rect = Rect2(0, 16, 32, 16)
|
||||||
shape = SubResource("RectangleShape2D_4k6gi")
|
shape = SubResource("RectangleShape2D_4k6gi")
|
||||||
|
|
||||||
[node name="PlacePreview" type="Node2D" parent="."]
|
[node name="PlacePreview" type="Node2D" parent="."]
|
||||||
|
visible = false
|
||||||
z_index = 1
|
z_index = 1
|
||||||
|
|
||||||
[node name="NW" type="Sprite2D" parent="PlacePreview"]
|
[node name="NW" type="Sprite2D" parent="PlacePreview"]
|
||||||
|
|
|
||||||
|
|
@ -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]
|
||||||
|
|
@ -891,7 +893,8 @@ func do_smoke_effect() -> void:
|
||||||
func on_timeout() -> void:
|
func on_timeout() -> void:
|
||||||
AudioManager.stop_music_override(AudioManager.MUSIC_OVERRIDES.STAR)
|
AudioManager.stop_music_override(AudioManager.MUSIC_OVERRIDES.STAR)
|
||||||
await get_tree().create_timer(1, false).timeout
|
await get_tree().create_timer(1, false).timeout
|
||||||
is_invincible = false
|
if $StarTimer.is_stopped():
|
||||||
|
is_invincible = false
|
||||||
|
|
||||||
|
|
||||||
func on_area_entered(area: Area2D) -> void:
|
func on_area_entered(area: Area2D) -> void:
|
||||||
|
|
|
||||||
|
|
@ -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()
|
||||||
|
|
|
||||||
|
|
@ -60,10 +60,11 @@ func frame_limit_changed(new_value := 0) -> void:
|
||||||
Settings.file.video.frame_limit = new_value
|
Settings.file.video.frame_limit = new_value
|
||||||
|
|
||||||
func set_window_size(value := []) -> void:
|
func set_window_size(value := []) -> void:
|
||||||
|
pass
|
||||||
# nabbup: Recenter resized window on launch
|
# nabbup: Recenter resized window on launch
|
||||||
var newpos = get_window().position - Vector2i((value[0]-get_window().size.x), (value[1]-get_window().size.y))/2
|
#var newpos = get_window().position - Vector2i((value[0]-get_window().size.x), (value[1]-get_window().size.y))/2
|
||||||
get_window().size = Vector2(value[0], value[1])
|
#get_window().size = Vector2(value[0], value[1])
|
||||||
get_window().position = newpos
|
#get_window().position = newpos
|
||||||
|
|
||||||
func set_value(value_name := "", value = null) -> void:
|
func set_value(value_name := "", value = null) -> void:
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue