Better lava

This commit is contained in:
bingus_violet 2024-03-17 21:56:16 -05:00
parent 4f70414ed9
commit d0d7899340
82 changed files with 1747 additions and 738 deletions

View file

@ -0,0 +1,21 @@
extends AudioStreamPlayer2D
var immune = 0.3
@onready var player = $"../../"
func _ready():
#pitch_scale = player.velocity.y / player.JUMP_VELOCITY
play()
func _process(delta):
immune -= delta
if Input.is_action_pressed("jump") or immune > 0:
pitch_scale += delta * (pitch_scale)
volume_db -= delta * 15 * (1 - immune)
if player.is_on_floor():
queue_free()
func _on_finished():
queue_free()

View file

@ -0,0 +1,11 @@
[gd_scene load_steps=3 format=3 uid="uid://6r1nxts67d3y"]
[ext_resource type="AudioStream" uid="uid://brr87ocprh24d" path="res://Player/BasicCharacter/Sounds/Jump/jump.wav" id="1_teh8j"]
[ext_resource type="Script" path="res://Player/BasicCharacter/Sounds/Jump/jump.gd" id="2_pbb5s"]
[node name="Jump" type="AudioStreamPlayer2D"]
stream = ExtResource("1_teh8j")
volume_db = -9.333
script = ExtResource("2_pbb5s")
[connection signal="finished" from="." to="." method="_on_finished"]

Binary file not shown.

View file

@ -0,0 +1,24 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://brr87ocprh24d"
path="res://.godot/imported/jump.wav-c6b485806c8137a8a435843a1a298f4a.sample"
[deps]
source_file="res://Player/BasicCharacter/Sounds/Jump/jump.wav"
dest_files=["res://.godot/imported/jump.wav-c6b485806c8137a8a435843a1a298f4a.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=true
edit/normalize=true
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=0

Binary file not shown.

View file

@ -0,0 +1,24 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://d2hkg80n611cw"
path="res://.godot/imported/Landed.wav-13b34b4f1d2c96168e48383f65586176.sample"
[deps]
source_file="res://Player/BasicCharacter/Sounds/Landed.wav"
dest_files=["res://.godot/imported/Landed.wav-13b34b4f1d2c96168e48383f65586176.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=true
edit/normalize=true
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=0

Binary file not shown.

View file

@ -0,0 +1,24 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://ditim46yxen6i"
path="res://.godot/imported/SquishSound.wav-ee207de3f25f8fd86f50260537e02e5e.sample"
[deps]
source_file="res://Player/BasicCharacter/Sounds/SquishSound.wav"
dest_files=["res://.godot/imported/SquishSound.wav-ee207de3f25f8fd86f50260537e02e5e.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=true
edit/normalize=true
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=0

Binary file not shown.

View file

@ -0,0 +1,24 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://d1rabaeyx578u"
path="res://.godot/imported/WallSlide.wav-9978fc2ada42c1cdff054ba186d3defa.sample"
[deps]
source_file="res://Player/BasicCharacter/Sounds/WallSlide/WallSlide.wav"
dest_files=["res://.godot/imported/WallSlide.wav-9978fc2ada42c1cdff054ba186d3defa.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=true
edit/normalize=true
edit/loop_mode=3
edit/loop_begin=10000
edit/loop_end=-5000
compress/mode=0

View file

@ -0,0 +1,11 @@
extends AudioStreamPlayer2D
@onready var player = $"../../"
func _physics_process(delta):
pitch_scale = lerp(pitch_scale, abs(player.velocity.y) / 200, delta * 5)
if player.isWallSliding() and playing == false:
playing = true
elif player.isWallSliding() == false:
playing = false