This commit is contained in:
JHDev2006
2025-10-14 16:27:13 +01:00
11 changed files with 43 additions and 5 deletions

View File

@@ -0,0 +1,10 @@
{
"Normal": {
"source": "PSwitch.mp3",
"loop": 8.801
},
"Hurry": {
"source": "PSwitchHurry.mp3",
"loop": 7.55
}
}

View File

@@ -1,3 +1,3 @@
{
"variations": {"source": "PSwitch.mp3"}
"variations": {"source": "PSwitch.bgm"}
}

Binary file not shown.

View 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

View File

@@ -310,6 +310,7 @@ layer = 1
[node name="FPSCount" type="Label" parent="GameHUD"]
unique_name_in_owner = true
visible = false
anchors_preset = 3
anchor_left = 1.0
anchor_top = 1.0

View File

@@ -13,6 +13,7 @@ func check_brick_empty() -> void:
func on_block_hit(player: Player) -> void:
if player.power_state.hitbox_size == "Big":
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
destroy()
Global.score += 50

View File

@@ -270,6 +270,7 @@ func _physics_process(delta: float) -> void:
set_power_state_frame()
if Input.is_action_just_pressed("debug_noclip") and Global.debug_mode:
state_machine.transition_to("NoClip")
Global.log_comment("NOCLIP Enabled")
up_direction = -gravity_vector
handle_directions()
handle_block_collision_detection()

View File

@@ -263,6 +263,10 @@ func take_screenshot() -> void:
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 err = img.save_png(filename)
if !err:
log_comment("Screenshot Saved!")
else:
log_error(error_string(err))
func handle_p_switch(delta: float) -> void:
if p_switch_active and get_tree().paused == false:

View File

@@ -13,7 +13,7 @@ func enter(msg := {}) -> void:
player.set_collision_mask_value(i + 1, false)
player.gravity = player.JUMP_GRAVITY
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:
if can_fall:
@@ -22,8 +22,9 @@ func physics_update(delta: float) -> void:
player.play_animation("DieFreeze")
player.sprite.speed_scale = 1
if can_fall:
player.velocity.y += (player.JUMP_GRAVITY / delta) * delta
player.velocity.y = clamp(player.velocity.y, -INF, player.MAX_FALL_SPEED)
# nabbup : Flip death gravity when upside down
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()
if Input.is_action_just_pressed("ui_accept") or Input.is_action_just_pressed("jump_0"):
player.death_load()

View File

@@ -15,6 +15,7 @@ func physics_update(_delta: float) -> void:
player.move_and_slide()
if Input.is_action_just_pressed("jump_0"):
state_machine.transition_to("Normal")
Global.log_comment("NOCLIP Disabled")
func exit() -> void:
player.can_hurt = false