generated from krampus/template-godot4
Compare commits
No commits in common. "d9e5b72041e72223f86637b792304576bcce52ad" and "0edf520a21ddd5b2a4a9d5d8a068ac263c363f12" have entirely different histories.
d9e5b72041
...
0edf520a21
BIN
asset_dev/sfx/635106__joedeshon__thumping_on_a_plastic_bottle.wav
(Stored with Git LFS)
BIN
asset_dev/sfx/635106__joedeshon__thumping_on_a_plastic_bottle.wav
(Stored with Git LFS)
Binary file not shown.
Binary file not shown.
BIN
assets/sfx/tools/collect5.wav
(Stored with Git LFS)
BIN
assets/sfx/tools/collect5.wav
(Stored with Git LFS)
Binary file not shown.
@ -1,24 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://cof6pg6yadsac"
|
||||
path="res://.godot/imported/collect5.wav-9560532de8bcb52b4f7fb8f0325d4125.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sfx/tools/collect5.wav"
|
||||
dest_files=["res://.godot/imported/collect5.wav-9560532de8bcb52b4f7fb8f0325d4125.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop_mode=0
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=2
|
@ -118,7 +118,7 @@ seamless = true
|
||||
seamless_blend_skirt = 0.5
|
||||
noise = ExtResource("7_7cbja")
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_qjnj2"]
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_aix42"]
|
||||
resource_local_to_scene = true
|
||||
render_priority = 0
|
||||
shader = ExtResource("6_6frcc")
|
||||
@ -306,7 +306,7 @@ unique_name_in_owner = true
|
||||
body = NodePath("..")
|
||||
mesh_instance = NodePath("../..")
|
||||
initial_mask = ExtResource("5_aix42")
|
||||
source_gunk_material = SubResource("ShaderMaterial_qjnj2")
|
||||
source_gunk_material = SubResource("ShaderMaterial_aix42")
|
||||
|
||||
[node name="Bulkhead" parent="." instance=ExtResource("8_ujrcv")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -6.5, 0, -2)
|
||||
|
@ -164,6 +164,7 @@ collision_mode = 2
|
||||
|
||||
[node name="GrunkSplatter" type="GPUParticles3D"]
|
||||
sorting_offset = 9.0
|
||||
emitting = false
|
||||
amount = 64
|
||||
lifetime = 0.3
|
||||
one_shot = true
|
||||
@ -175,6 +176,7 @@ script = ExtResource("2_grvat")
|
||||
[node name="SubSplatter" type="GPUParticles3D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
sorting_offset = 9.0
|
||||
emitting = false
|
||||
amount = 4
|
||||
lifetime = 0.3
|
||||
one_shot = true
|
||||
@ -209,6 +211,7 @@ shape = SubResource("SphereShape3D_6adkd")
|
||||
[node name="GrunkDust" parent="." instance=ExtResource("7_opa8j")]
|
||||
unique_name_in_owner = true
|
||||
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0, 0)
|
||||
emitting = false
|
||||
amount = 512
|
||||
lifetime = 1.2
|
||||
one_shot = true
|
||||
|
@ -1,46 +0,0 @@
|
||||
extends AudioStreamPlayer
|
||||
|
||||
@export var interval := 200.0
|
||||
|
||||
@export var max_delta := 2000.0
|
||||
|
||||
@export var delay_mean := 0.7
|
||||
@export var delay_st_dev := 0.1
|
||||
|
||||
@export var counter_decay := 40.0
|
||||
|
||||
@export var pitch_variance := 0.15
|
||||
@export var noise_rate := 0.01
|
||||
@export var noise: Noise
|
||||
|
||||
var _counter := 0.0
|
||||
|
||||
@onready var cooldown: Timer = %Cooldown
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
if World.instance and World.instance.manager:
|
||||
World.instance.manager.grunk_collected.connect(on_grunk_collected)
|
||||
|
||||
|
||||
func on_grunk_collected(delta: float) -> void:
|
||||
delta = min(delta, max_delta)
|
||||
while delta > _counter:
|
||||
delta -= _counter
|
||||
_counter = interval
|
||||
var delay := randfn(delay_mean, delay_st_dev)
|
||||
get_tree().create_timer(delay).timeout.connect(play_random)
|
||||
_counter -= delta
|
||||
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
_counter = move_toward(_counter, 0.0, counter_decay * delta)
|
||||
|
||||
|
||||
func play_random() -> void:
|
||||
var noise_sample := clampf(
|
||||
2 * noise.get_noise_1d(Engine.get_process_frames() * noise_rate), -1, 1
|
||||
)
|
||||
pitch_scale = 1.0 + (pitch_variance * noise_sample)
|
||||
print_debug("noise: ", noise_sample)
|
||||
play()
|
@ -1 +0,0 @@
|
||||
uid://dwt66u7ua1to4
|
@ -1,20 +0,0 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://cbtmhu787diev"]
|
||||
|
||||
[ext_resource type="AudioStream" uid="uid://cof6pg6yadsac" path="res://assets/sfx/tools/collect5.wav" id="1_y7it3"]
|
||||
[ext_resource type="Script" uid="uid://dwt66u7ua1to4" path="res://src/player/grunk_collection_sfx/grunk_collection_sfx.gd" id="5_ihwko"]
|
||||
|
||||
[sub_resource type="FastNoiseLite" id="FastNoiseLite_y7it3"]
|
||||
|
||||
[node name="GrunkCollectionSFX" type="AudioStreamPlayer"]
|
||||
stream = ExtResource("1_y7it3")
|
||||
volume_db = -6.0
|
||||
script = ExtResource("5_ihwko")
|
||||
noise_rate = 1.0
|
||||
noise = SubResource("FastNoiseLite_y7it3")
|
||||
|
||||
[node name="Cooldown" type="Timer" parent="."]
|
||||
unique_name_in_owner = true
|
||||
wait_time = 0.12
|
||||
one_shot = true
|
||||
|
||||
[connection signal="timeout" from="Cooldown" to="." method="trigger"]
|
@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=70 format=3 uid="uid://bwe2jdmvinhqd"]
|
||||
[gd_scene load_steps=69 format=3 uid="uid://bwe2jdmvinhqd"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://buwh0g1ga2aka" path="res://src/player/player.gd" id="1_npueo"]
|
||||
[ext_resource type="Script" uid="uid://cx1yt0drthpw3" path="res://src/player/camera_controller.gd" id="2_veeqv"]
|
||||
@ -39,7 +39,6 @@
|
||||
[ext_resource type="Script" uid="uid://b5loa2u6s5l5c" path="res://src/player/rigid_body_physics.gd" id="36_phdu6"]
|
||||
[ext_resource type="Script" uid="uid://dg55jdoyctdq6" path="res://src/game/tutorial/tutorial_timer.gd" id="38_evlgt"]
|
||||
[ext_resource type="AudioStream" uid="uid://c01y7jauf4spn" path="res://assets/sfx/tools/tool_switch_v0.wav" id="39_gsylq"]
|
||||
[ext_resource type="PackedScene" uid="uid://cbtmhu787diev" path="res://src/player/grunk_collection_sfx/grunk_collection_sfx.tscn" id="40_utg71"]
|
||||
|
||||
[sub_resource type="Animation" id="Animation_x42xx"]
|
||||
length = 0.001
|
||||
@ -835,5 +834,3 @@ tutorial_key = &"game/tutorial/progress/move"
|
||||
unique_name_in_owner = true
|
||||
stream = ExtResource("39_gsylq")
|
||||
pitch_scale = 1.8
|
||||
|
||||
[node name="GrunkCollectionSFX" parent="." instance=ExtResource("40_utg71")]
|
||||
|
Loading…
x
Reference in New Issue
Block a user