Browse Source

Music and Creaks

Henrik
Desaru 3 months ago
parent
commit
f634b01785
24 changed files with 72 additions and 37 deletions
  1. BIN
     
  2. BIN
     
  3. BIN
     
  4. BIN
     
  5. BIN
     
  6. BIN
     
  7. BIN
     
  8. BIN
     
  9. BIN
     
  10. BIN
     
  11. BIN
     
  12. BIN
     
  13. BIN
     
  14. BIN
     
  15. BIN
     
  16. BIN
     
  17. BIN
     
  18. BIN
     
  19. BIN
     
  20. +6
    -1
      scenes/MainMenu.tscn
  21. +26
    -26
      scenes/sub_scenes/OxygenBubble.tscn
  22. +28
    -8
      scenes/sub_scenes/Seagull.tscn
  23. +2
    -2
      scenes/sub_scenes/player.tscn
  24. +10
    -0
      scenes/sub_scenes/ship.gd

BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


+ 6
- 1
scenes/MainMenu.tscn View File

@@ -1,8 +1,9 @@
[gd_scene load_steps=6 format=2]
[gd_scene load_steps=7 format=2]

[ext_resource path="res://scenes/Ship.tscn" type="PackedScene" id=1]
[ext_resource path="res://assets/font/booter_big.tres" type="DynamicFont" id=2]
[ext_resource path="res://assets/font/booter_mid.tres" type="DynamicFont" id=3]
[ext_resource path="res://assets/sound/Music_Menu.ogg" type="AudioStream" id=4]

[sub_resource type="GDScript" id=1]
script/source = "extends Button
@@ -93,5 +94,9 @@ margin_right = 417.0
margin_bottom = 202.0
text = "Exit"
script = SubResource( 2 )

[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 4 )
autoplay = true
[connection signal="pressed" from="MarginContainer/VBoxContainer/MarginContainer/VBoxContainer/Start" to="MarginContainer/VBoxContainer/MarginContainer/VBoxContainer/Start" method="_on_pressed"]
[connection signal="pressed" from="MarginContainer/VBoxContainer/MarginContainer/VBoxContainer/Exit" to="MarginContainer/VBoxContainer/MarginContainer/VBoxContainer/Exit" method="_on_pressed"]

+ 26
- 26
scenes/sub_scenes/OxygenBubble.tscn View File

@@ -18,38 +18,38 @@ constant = Vector3( 7, 0, 0 )
[sub_resource type="VisualShaderNodeScalarOp" id=6]
operator = 2

[sub_resource type="OpenSimplexNoise" id=8]
[sub_resource type="OpenSimplexNoise" id=7]

[sub_resource type="NoiseTexture" id=9]
noise = SubResource( 8 )
[sub_resource type="NoiseTexture" id=8]
noise = SubResource( 7 )

[sub_resource type="VisualShaderNodeTexture" id=10]
[sub_resource type="VisualShaderNodeTexture" id=9]
output_port_for_preview = 0
texture = SubResource( 9 )
texture = SubResource( 8 )
texture_type = 1

[sub_resource type="VisualShaderNodeColorUniform" id=11]
[sub_resource type="VisualShaderNodeColorUniform" id=10]
uniform_name = "Color"

[sub_resource type="VisualShaderNodeFresnel" id=12]
[sub_resource type="VisualShaderNodeFresnel" id=11]
default_input_values = [ 2, false, 3, 5.0 ]

[sub_resource type="VisualShaderNodeInput" id=13]
[sub_resource type="VisualShaderNodeInput" id=12]
input_name = "uv"

[sub_resource type="VisualShaderNodeScalarOp" id=14]
[sub_resource type="VisualShaderNodeScalarOp" id=13]

[sub_resource type="VisualShaderNodeVec3Constant" id=15]
[sub_resource type="VisualShaderNodeVec3Constant" id=14]
constant = Vector3( 0.5, 0, 0 )

[sub_resource type="VisualShaderNodeScalarOp" id=16]
[sub_resource type="VisualShaderNodeScalarOp" id=15]
operator = 2

[sub_resource type="VisualShaderNodeVectorOp" id=19]
[sub_resource type="VisualShaderNodeVectorOp" id=16]

[sub_resource type="VisualShaderNodeVec3Constant" id=20]
[sub_resource type="VisualShaderNodeVec3Constant" id=17]

[sub_resource type="VisualShader" id=17]
[sub_resource type="VisualShader" id=18]
code = "shader_type spatial;
render_mode depth_draw_alpha_prepass, cull_disabled, specular_schlick_ggx;

@@ -123,7 +123,7 @@ graph_offset = Vector2( -1283.76, -92.3458 )
modes/cull = 2
modes/depth_draw = 3
nodes/fragment/0/position = Vector2( 420, 40 )
nodes/fragment/2/node = SubResource( 12 )
nodes/fragment/2/node = SubResource( 11 )
nodes/fragment/2/position = Vector2( -160, 220 )
nodes/fragment/10/node = SubResource( 2 )
nodes/fragment/10/position = Vector2( -600, 140 )
@@ -135,30 +135,30 @@ nodes/fragment/14/node = SubResource( 5 )
nodes/fragment/14/position = Vector2( -1280, 140 )
nodes/fragment/15/node = SubResource( 6 )
nodes/fragment/15/position = Vector2( -800, 0 )
nodes/fragment/18/node = SubResource( 10 )
nodes/fragment/18/node = SubResource( 9 )
nodes/fragment/18/position = Vector2( -460, -400 )
nodes/fragment/19/node = SubResource( 11 )
nodes/fragment/19/node = SubResource( 10 )
nodes/fragment/19/position = Vector2( -360, 0 )
nodes/fragment/20/node = SubResource( 13 )
nodes/fragment/20/node = SubResource( 12 )
nodes/fragment/20/position = Vector2( -1180, -420 )
nodes/fragment/21/node = SubResource( 14 )
nodes/fragment/21/node = SubResource( 13 )
nodes/fragment/21/position = Vector2( -860, -360 )
nodes/fragment/22/node = SubResource( 15 )
nodes/fragment/22/node = SubResource( 14 )
nodes/fragment/22/position = Vector2( -1460, -220 )
nodes/fragment/23/node = SubResource( 16 )
nodes/fragment/23/node = SubResource( 15 )
nodes/fragment/23/position = Vector2( -1060, -200 )
nodes/fragment/24/node = SubResource( 19 )
nodes/fragment/24/node = SubResource( 16 )
nodes/fragment/24/position = Vector2( 76.1768, -58 )
nodes/fragment/25/node = SubResource( 20 )
nodes/fragment/25/node = SubResource( 17 )
nodes/fragment/25/position = Vector2( -2103.03, 140.154 )
nodes/fragment/connections = PoolIntArray( 10, 0, 11, 0, 11, 0, 2, 3, 15, 0, 10, 0, 20, 0, 21, 0, 21, 0, 18, 0, 12, 0, 15, 0, 14, 0, 15, 1, 12, 0, 23, 0, 22, 0, 23, 1, 23, 0, 21, 1, 2, 0, 0, 1, 18, 0, 24, 0, 19, 0, 24, 1, 24, 0, 0, 0 )

[sub_resource type="ShaderMaterial" id=18]
shader = SubResource( 17 )
[sub_resource type="ShaderMaterial" id=19]
shader = SubResource( 18 )
shader_param/Color = Color( 0.4, 0.827451, 1, 1 )

[node name="Spatial" type="Spatial"]

[node name="MeshInstance" type="MeshInstance" parent="."]
mesh = SubResource( 1 )
material/0 = SubResource( 18 )
material/0 = SubResource( 19 )

+ 28
- 8
scenes/sub_scenes/Seagull.tscn View File

@@ -1,14 +1,23 @@
[gd_scene load_steps=4 format=2]
[gd_scene load_steps=8 format=2]

[ext_resource path="res://assets/sound/gulls 02.wav" type="AudioStream" id=1]
[ext_resource path="res://assets/sound/Gulls/Seagulls_04_mono.ogg" type="AudioStream" id=1]
[ext_resource path="res://assets/sound/Gulls/Seagulls_01_mono.ogg" type="AudioStream" id=2]
[ext_resource path="res://assets/sound/Gulls/Seagulls_02_mono.ogg" type="AudioStream" id=3]
[ext_resource path="res://assets/sound/Gulls/Seagulls_03_mono.ogg" type="AudioStream" id=4]
[ext_resource path="res://addons/randomAudioStreamPlayer/random_audio_stream_player_3D.gd" type="Script" id=5]

[sub_resource type="CapsuleMesh" id=1]

[sub_resource type="GDScript" id=2]
script/source = "extends MeshInstance

func _ready():
pass

onready var audio = get_node(\"RandomAudioStreamPlayer3D\")
onready var timer = get_node(\"Timer\")

func _on_Timer_timeout():
audio.play()
timer.start()
"

[node name="Gull Dummy" type="MeshInstance"]
@@ -17,7 +26,18 @@ mesh = SubResource( 1 )
material/0 = null
script = SubResource( 2 )

[node name="AudioStreamPlayer3D" type="AudioStreamPlayer3D" parent="."]
stream = ExtResource( 1 )
autoplay = true
doppler_tracking = 2
[node name="Timer" type="Timer" parent="."]
wait_time = 3.0
autostart = true

[node name="RandomAudioStreamPlayer3D" type="AudioStreamPlayer3D" parent="."]
script = ExtResource( 5 )
streams = [ ExtResource( 2 ), ExtResource( 3 ), ExtResource( 4 ), ExtResource( 1 ) ]
random_strategy = 0
randomize_volume = false
volume_min = 0.0
volume_max = 0.0
randomize_pitch = false
pitch_min = 1.0
pitch_max = 1.0
[connection signal="timeout" from="Timer" to="." method="_on_Timer_timeout"]

+ 2
- 2
scenes/sub_scenes/player.tscn View File

@@ -114,8 +114,8 @@ script = ExtResource( 1 )
streams = [ ExtResource( 3 ), ExtResource( 2 ), ExtResource( 4 ) ]
random_strategy = 2
randomize_volume = false
volume_min = 0.0
volume_max = 0.0
volume_min = -5.0
volume_max = -5.0
randomize_pitch = false
pitch_min = 1.0
pitch_max = 1.0


+ 10
- 0
scenes/sub_scenes/ship.gd View File

@@ -0,0 +1,10 @@
extends Spatial

onready var creakAudio = get_node("RandomAudioStreamPlayer3D")
onready var timer = get_node("Timer")

func _on_Timer_timeout():
creakAudio.play()
timer.set_wait_time(5.0)

Loading…
Cancel
Save