mirror of
https://github.com/JHDev2006/Super-Mario-Bros.-Remastered-Public.git
synced 2025-10-21 15:08:12 +00:00
Merge branch 'main' of https://github.com/JHDev2006/Super-Mario-Bros.-Remastered-Public
This commit is contained in:
10
Assets/Audio/BGM/PSwitch.bgm
Normal file
10
Assets/Audio/BGM/PSwitch.bgm
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"Normal": {
|
||||||
|
"source": "PSwitch.mp3",
|
||||||
|
"loop": 8.801
|
||||||
|
},
|
||||||
|
"Hurry": {
|
||||||
|
"source": "PSwitchHurry.mp3",
|
||||||
|
"loop": 7.55
|
||||||
|
}
|
||||||
|
}
|
@@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
"variations": {"source": "PSwitch.mp3"}
|
"variations": {"source": "PSwitch.bgm"}
|
||||||
}
|
}
|
||||||
|
BIN
Assets/Audio/BGM/PSwitchHurry.mp3
Normal file
BIN
Assets/Audio/BGM/PSwitchHurry.mp3
Normal file
Binary file not shown.
19
Assets/Audio/BGM/PSwitchHurry.mp3.import
Normal file
19
Assets/Audio/BGM/PSwitchHurry.mp3.import
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="mp3"
|
||||||
|
type="AudioStreamMP3"
|
||||||
|
uid="uid://7iqief2hn4rg"
|
||||||
|
path="res://.godot/imported/PSwitchHurry.mp3-3abe83c8eb89107e332495802cd7d785.mp3str"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://Assets/Audio/BGM/PSwitchHurry.mp3"
|
||||||
|
dest_files=["res://.godot/imported/PSwitchHurry.mp3-3abe83c8eb89107e332495802cd7d785.mp3str"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
loop=false
|
||||||
|
loop_offset=0
|
||||||
|
bpm=0
|
||||||
|
beat_count=0
|
||||||
|
bar_beats=4
|
File diff suppressed because one or more lines are too long
@@ -310,6 +310,7 @@ layer = 1
|
|||||||
|
|
||||||
[node name="FPSCount" type="Label" parent="GameHUD"]
|
[node name="FPSCount" type="Label" parent="GameHUD"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
visible = false
|
||||||
anchors_preset = 3
|
anchors_preset = 3
|
||||||
anchor_left = 1.0
|
anchor_left = 1.0
|
||||||
anchor_top = 1.0
|
anchor_top = 1.0
|
||||||
|
@@ -13,6 +13,7 @@ func check_brick_empty() -> void:
|
|||||||
func on_block_hit(player: Player) -> void:
|
func on_block_hit(player: Player) -> void:
|
||||||
if player.power_state.hitbox_size == "Big":
|
if player.power_state.hitbox_size == "Big":
|
||||||
if item == null:
|
if item == null:
|
||||||
|
self.add_collision_exception_with(player) # Don't bonk with physics, will be handled after block is broken
|
||||||
await get_tree().physics_frame
|
await get_tree().physics_frame
|
||||||
destroy()
|
destroy()
|
||||||
Global.score += 50
|
Global.score += 50
|
||||||
|
@@ -270,6 +270,7 @@ func _physics_process(delta: float) -> void:
|
|||||||
set_power_state_frame()
|
set_power_state_frame()
|
||||||
if Input.is_action_just_pressed("debug_noclip") and Global.debug_mode:
|
if Input.is_action_just_pressed("debug_noclip") and Global.debug_mode:
|
||||||
state_machine.transition_to("NoClip")
|
state_machine.transition_to("NoClip")
|
||||||
|
Global.log_comment("NOCLIP Enabled")
|
||||||
up_direction = -gravity_vector
|
up_direction = -gravity_vector
|
||||||
handle_directions()
|
handle_directions()
|
||||||
handle_block_collision_detection()
|
handle_block_collision_detection()
|
||||||
|
@@ -263,6 +263,10 @@ func take_screenshot() -> void:
|
|||||||
var img: Image = get_viewport().get_texture().get_image()
|
var img: Image = get_viewport().get_texture().get_image()
|
||||||
var filename = Global.config_path.path_join("screenshots/screenshot_" + str(int(Time.get_unix_time_from_system())) + ".png")
|
var filename = Global.config_path.path_join("screenshots/screenshot_" + str(int(Time.get_unix_time_from_system())) + ".png")
|
||||||
var err = img.save_png(filename)
|
var err = img.save_png(filename)
|
||||||
|
if !err:
|
||||||
|
log_comment("Screenshot Saved!")
|
||||||
|
else:
|
||||||
|
log_error(error_string(err))
|
||||||
|
|
||||||
func handle_p_switch(delta: float) -> void:
|
func handle_p_switch(delta: float) -> void:
|
||||||
if p_switch_active and get_tree().paused == false:
|
if p_switch_active and get_tree().paused == false:
|
||||||
|
@@ -13,7 +13,7 @@ func enter(msg := {}) -> void:
|
|||||||
player.set_collision_mask_value(i + 1, false)
|
player.set_collision_mask_value(i + 1, false)
|
||||||
player.gravity = player.JUMP_GRAVITY
|
player.gravity = player.JUMP_GRAVITY
|
||||||
if msg["Pit"] == false:
|
if msg["Pit"] == false:
|
||||||
player.velocity.y = -player.DEATH_JUMP_HEIGHT
|
player.velocity.y = -player.DEATH_JUMP_HEIGHT * player.gravity_vector.y # nabbup : Flip death gravity when upside down
|
||||||
|
|
||||||
func physics_update(delta: float) -> void:
|
func physics_update(delta: float) -> void:
|
||||||
if can_fall:
|
if can_fall:
|
||||||
@@ -22,8 +22,9 @@ func physics_update(delta: float) -> void:
|
|||||||
player.play_animation("DieFreeze")
|
player.play_animation("DieFreeze")
|
||||||
player.sprite.speed_scale = 1
|
player.sprite.speed_scale = 1
|
||||||
if can_fall:
|
if can_fall:
|
||||||
player.velocity.y += (player.JUMP_GRAVITY / delta) * delta
|
# nabbup : Flip death gravity when upside down
|
||||||
player.velocity.y = clamp(player.velocity.y, -INF, player.MAX_FALL_SPEED)
|
player.velocity.y += (player.JUMP_GRAVITY / delta) * delta * player.gravity_vector.y
|
||||||
|
player.velocity.y = clamp(player.velocity.y, -player.MAX_FALL_SPEED, player.MAX_FALL_SPEED) # wish this could be better than just substituting -INF but you can't win em all ~ nabbup
|
||||||
player.move_and_slide()
|
player.move_and_slide()
|
||||||
if Input.is_action_just_pressed("ui_accept") or Input.is_action_just_pressed("jump_0"):
|
if Input.is_action_just_pressed("ui_accept") or Input.is_action_just_pressed("jump_0"):
|
||||||
player.death_load()
|
player.death_load()
|
||||||
|
@@ -15,6 +15,7 @@ func physics_update(_delta: float) -> void:
|
|||||||
player.move_and_slide()
|
player.move_and_slide()
|
||||||
if Input.is_action_just_pressed("jump_0"):
|
if Input.is_action_just_pressed("jump_0"):
|
||||||
state_machine.transition_to("Normal")
|
state_machine.transition_to("Normal")
|
||||||
|
Global.log_comment("NOCLIP Disabled")
|
||||||
|
|
||||||
func exit() -> void:
|
func exit() -> void:
|
||||||
player.can_hurt = false
|
player.can_hurt = false
|
||||||
|
Reference in New Issue
Block a user