feat: add double-barrel shotgun weapon, player movement state machine, and procedural sound assets

This commit is contained in:
DottsGit
2026-06-04 16:40:15 -04:00
parent 13ca2f46e9
commit 67bd5b4302
18 changed files with 282 additions and 3 deletions
+9
View File
@@ -22,6 +22,9 @@ func enter(_data: Dictionary = {}) -> void:
machine.on_ground = false
_last_vel = machine.player.velocity
if machine.player.wallrun_player and not machine.player.wallrun_player.playing:
machine.player.wallrun_player.play()
var hvel := Vector3(machine.player.velocity.x, 0.0, machine.player.velocity.z)
_current_tangent = machine.wall_normal.cross(Vector3.UP).normalized()
if hvel.dot(_current_tangent) < 0.0:
@@ -43,6 +46,9 @@ func exit() -> void:
var rig = _get_camera_rig()
if rig:
rig.clear_wall_tilt()
if machine.player.wallrun_player:
machine.player.wallrun_player.stop()
func update(delta: float) -> void:
@@ -57,6 +63,9 @@ func update(delta: float) -> void:
var player := machine.player
var vel: Vector3 = player.velocity
if player.wallrun_player and not player.wallrun_player.playing:
player.wallrun_player.play()
if vel.distance_squared_to(_last_vel) > 100.0:
machine.wall_normal = Vector3.ZERO
machine.wall_side = 0.0