Audio additions: jump.ogg - comitting to continue development in another environment.
Release / Export Game (push) Successful in 2m0s

This commit is contained in:
qwsdcvghyu89
2026-06-15 00:07:56 +10:00
parent e252a94f46
commit 6b9bb6da5a
5 changed files with 35 additions and 0 deletions
Binary file not shown.
+19
View File
@@ -0,0 +1,19 @@
[remap]
importer="oggvorbisstr"
type="AudioStreamOggVorbis"
uid="uid://dkx1v6c7vv0iq"
path="res://.godot/imported/jump.ogg-d217a70c8ca2fe077e37d9f442c771d3.oggvorbisstr"
[deps]
source_file="res://sounds/sfx/jump.ogg"
dest_files=["res://.godot/imported/jump.ogg-d217a70c8ca2fe077e37d9f442c771d3.oggvorbisstr"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4
+13
View File
@@ -4,6 +4,12 @@ using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
public enum JumpKind {
Ground,
Turnback,
Midair
}
public partial class PlayerPhysicsController : CharacterBody2D {
// [Export]
// public float RunMultiplier { get; set; } = 1.84f;
@@ -11,6 +17,10 @@ public partial class PlayerPhysicsController : CharacterBody2D {
[Signal]
public delegate void OnTurnbackJumpEventHandler(bool onJumpPoint, bool isOnWall);
[Signal]
public delegate void OnJumpEventHandler(JumpKind kind, bool isOnGround, bool isOnWall);
[ExportCategory("Accelerations and Impulses")]
[Export]
public float WalkAcceleration { get; set; } = 3f;
@@ -134,6 +144,7 @@ public partial class PlayerPhysicsController : CharacterBody2D {
else _timeOffGround += (float)delta;
if (Input.IsActionJustPressed("jump")) {
EmitSignal(SignalName.OnJump, (int)JumpKind.Ground, this.IsOnFloor(), this.IsOnWall());
vely = -_lv;
}
@@ -153,6 +164,7 @@ public partial class PlayerPhysicsController : CharacterBody2D {
var side = velx > 0 ? PredictiveCollisions.Location.BottomRight : PredictiveCollisions.Location.BottomLeft;
if (Predictor.AnyHit(side) && !this.IsOnWall()) {
EmitSignal(SignalName.OnTurnbackJump, true, this.IsOnWall());
EmitSignal(SignalName.OnJump, (int)JumpKind.Turnback, this.IsOnFloor(), this.IsOnWall());
var hits = Predictor.GetLastCastHits(side);
_ = hits.First(x => {
if (x.Obj is null) return false;
@@ -194,6 +206,7 @@ public partial class PlayerPhysicsController : CharacterBody2D {
}
if (Input.IsActionJustPressed("jump") && Mathf.Abs(vely) < 2) {
EmitSignal(SignalName.OnJump, (int)JumpKind.Midair, this.IsOnFloor(), this.IsOnWall());
vely = -_lv;
}
+2
View File
@@ -0,0 +1,2 @@
extends AudioStreamPlayer
+1
View File
@@ -0,0 +1 @@
uid://bwgqvwybyrsmq