Browse Source

Merge branch 'Henrik' into max

max
Pixdigit 3 months ago
parent
commit
de09fd4a1c
17 changed files with 168 additions and 11 deletions
  1. BIN
     
  2. +13
    -0
      assets/plant_engine.gd
  3. BIN
     
  4. +15
    -0
      assets/sound/Bucket_Fill_mono.ogg.import
  5. BIN
     
  6. +15
    -0
      assets/sound/Door_Open_mono.ogg.import
  7. BIN
     
  8. +15
    -0
      assets/sound/Music_Menu_Intro.ogg.import
  9. BIN
     
  10. +15
    -0
      assets/sound/Music_Menu_Loop.ogg.import
  11. BIN
     
  12. +15
    -0
      assets/sound/Pickup_Sack_mono.ogg.import
  13. +1
    -1
      assets/sound/Plant_Grow_mono.ogg.import
  14. +1
    -0
      assets/sound/Readme.md
  15. +24
    -0
      default_bus_layout.tres
  16. +42
    -10
      scenes/Ship.tscn
  17. +12
    -0
      scenes/sub_scenes/satzkasten.tscn

BIN
View File


+ 13
- 0
assets/plant_engine.gd View File

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

onready var audio = get_node("AudioStreamPlayer3D")



func _process(_delta):
if visible and not audio.playing:
print_debug("play")
audio.play()
elif not visible and audio.playing:
audio.stop()

BIN
View File


+ 15
- 0
assets/sound/Bucket_Fill_mono.ogg.import View File

@@ -0,0 +1,15 @@
[remap]

importer="ogg_vorbis"
type="AudioStreamOGGVorbis"
path="res://.import/Bucket_Fill_mono.ogg-4d049b8f9f755b1cf429202c14eb3c56.oggstr"

[deps]

source_file="res://assets/sound/Bucket_Fill_mono.ogg"
dest_files=[ "res://.import/Bucket_Fill_mono.ogg-4d049b8f9f755b1cf429202c14eb3c56.oggstr" ]

[params]

loop=false
loop_offset=0

BIN
View File


+ 15
- 0
assets/sound/Door_Open_mono.ogg.import View File

@@ -0,0 +1,15 @@
[remap]

importer="ogg_vorbis"
type="AudioStreamOGGVorbis"
path="res://.import/Door_Open_mono.ogg-5858e11d02d325b0efa0b4f0527709a4.oggstr"

[deps]

source_file="res://assets/sound/Door_Open_mono.ogg"
dest_files=[ "res://.import/Door_Open_mono.ogg-5858e11d02d325b0efa0b4f0527709a4.oggstr" ]

[params]

loop=false
loop_offset=0

BIN
View File


+ 15
- 0
assets/sound/Music_Menu_Intro.ogg.import View File

@@ -0,0 +1,15 @@
[remap]

importer="ogg_vorbis"
type="AudioStreamOGGVorbis"
path="res://.import/Music_Menu_Intro.ogg-cb5141e8d7455077fbd2080544c7180a.oggstr"

[deps]

source_file="res://assets/sound/Music_Menu_Intro.ogg"
dest_files=[ "res://.import/Music_Menu_Intro.ogg-cb5141e8d7455077fbd2080544c7180a.oggstr" ]

[params]

loop=true
loop_offset=0

BIN
View File


+ 15
- 0
assets/sound/Music_Menu_Loop.ogg.import View File

@@ -0,0 +1,15 @@
[remap]

importer="ogg_vorbis"
type="AudioStreamOGGVorbis"
path="res://.import/Music_Menu_Loop.ogg-5ac549cfcb9b19251556089587bc235f.oggstr"

[deps]

source_file="res://assets/sound/Music_Menu_Loop.ogg"
dest_files=[ "res://.import/Music_Menu_Loop.ogg-5ac549cfcb9b19251556089587bc235f.oggstr" ]

[params]

loop=true
loop_offset=0

BIN
View File


+ 15
- 0
assets/sound/Pickup_Sack_mono.ogg.import View File

@@ -0,0 +1,15 @@
[remap]

importer="ogg_vorbis"
type="AudioStreamOGGVorbis"
path="res://.import/Pickup_Sack_mono.ogg-dcf5b62b5fa297993961698c6385a70a.oggstr"

[deps]

source_file="res://assets/sound/Pickup_Sack_mono.ogg"
dest_files=[ "res://.import/Pickup_Sack_mono.ogg-dcf5b62b5fa297993961698c6385a70a.oggstr" ]

[params]

loop=false
loop_offset=0

+ 1
- 1
assets/sound/Plant_Grow_mono.ogg.import View File

@@ -11,5 +11,5 @@ dest_files=[ "res://.import/Plant_Grow_mono.ogg-43bd3219ada1029ad7d7dc914eec57c3

[params]

loop=true
loop=false
loop_offset=0

+ 1
- 0
assets/sound/Readme.md View File

@@ -0,0 +1 @@

+ 24
- 0
default_bus_layout.tres View File

@@ -25,3 +25,27 @@ bus/4/mute = false
bus/4/bypass_fx = false
bus/4/volume_db = -12.9844
bus/4/send = "Master"
bus/5/name = "Engine"
bus/5/solo = false
bus/5/mute = false
bus/5/bypass_fx = false
bus/5/volume_db = 3.2425
bus/5/send = "Master"
bus/6/name = "getWater"
bus/6/solo = false
bus/6/mute = false
bus/6/bypass_fx = false
bus/6/volume_db = 0.0
bus/6/send = "Master"
bus/7/name = "getSeed"
bus/7/solo = false
bus/7/mute = false
bus/7/bypass_fx = false
bus/7/volume_db = 0.0
bus/7/send = "Master"
bus/8/name = "getFertilizer"
bus/8/solo = false
bus/8/mute = false
bus/8/bypass_fx = false
bus/8/volume_db = 0.0
bus/8/send = "Master"

+ 42
- 10
scenes/Ship.tscn View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=44 format=2]
[gd_scene load_steps=48 format=2]

[ext_resource path="res://scenes/sub_scenes/ship.tscn" type="PackedScene" id=1]
[ext_resource path="res://scenes/sub_scenes/player.tscn" type="PackedScene" id=2]
@@ -11,6 +11,9 @@
[ext_resource path="res://assets/sound/creaks/Creak_03.ogg" type="AudioStream" id=9]
[ext_resource path="res://assets/sound/creaks/Creak_04.ogg" type="AudioStream" id=10]
[ext_resource path="res://assets/sound/Music_Main_Loop.ogg" type="AudioStream" id=11]
[ext_resource path="res://assets/sound/Door_Open_mono.ogg" type="AudioStream" id=12]
[ext_resource path="res://assets/sound/Pickup_Sack_mono.ogg" type="AudioStream" id=13]
[ext_resource path="res://assets/sound/Bucket_Fill_mono.ogg" type="AudioStream" id=14]

[sub_resource type="Environment" id=1]
background_mode = 1
@@ -186,6 +189,8 @@ func _physics_process(delta):
[sub_resource type="GDScript" id=27]
script/source = "extends Area

onready var audio = get_node(\"AudioStreamPlayer3D\")

func _ready():
pass

@@ -193,6 +198,7 @@ func _ready():
func _on_body_entered(body):
if body.name == \"Player\":
State.player_inventory = State.ITEM.WATER
audio.play()
"

[sub_resource type="BoxShape" id=28]
@@ -201,6 +207,8 @@ extents = Vector3( 1.17384, 2.64489, 1.23621 )
[sub_resource type="GDScript" id=29]
script/source = "extends Area

onready var audio = get_node(\"AudioStreamPlayer3D\")

func _ready():
pass

@@ -208,6 +216,7 @@ func _ready():
func _on_body_entered(body):
if body.name == \"Player\":
State.player_inventory = State.ITEM.FERTILIZER
audio.play()
"

[sub_resource type="BoxShape" id=30]
@@ -216,17 +225,34 @@ extents = Vector3( 1.47223, 2.50833, 2.55238 )
[sub_resource type="GDScript" id=31]
script/source = "extends Area

onready var audio = get_node(\"AudioStreamPlayer3D\")

func _ready():
pass



func _on_body_entered(body):
if body.name == \"Player\":
State.player_inventory = State.ITEM.SEED
audio.play()
"

[sub_resource type="BoxShape" id=32]
extents = Vector3( 1.47223, 2.27452, 1.36382 )

[sub_resource type="GDScript" id=33]
script/source = "extends Spatial

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


func _on_Timer_timeout():
audio.play()
timer.start(State.rng.randf_range(5.0,10.0))
"

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

[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
@@ -434,6 +460,10 @@ script = SubResource( 27 )
[node name="CollisionShape" type="CollisionShape" parent="WaterDetector"]
shape = SubResource( 28 )

[node name="AudioStreamPlayer3D" type="AudioStreamPlayer3D" parent="WaterDetector"]
stream = ExtResource( 14 )
bus = "getWater"

[node name="FertilizerDetector" type="Area" parent="."]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -2.71211, -4.76837e-07, 3.47488 )
script = SubResource( 29 )
@@ -442,6 +472,10 @@ script = SubResource( 29 )
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -10.3587, 8.62152, 1.31896 )
shape = SubResource( 30 )

[node name="AudioStreamPlayer3D" type="AudioStreamPlayer3D" parent="FertilizerDetector"]
stream = ExtResource( 13 )
bus = "getFertilizer"

[node name="SeedDetector" type="Area" parent="."]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 19.853, 11.718, 0.149496 )
script = SubResource( 31 )
@@ -450,8 +484,12 @@ script = SubResource( 31 )
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0787144, 0.580219, -0.135435 )
shape = SubResource( 32 )

[node name="AudioStreamPlayer3D" type="AudioStreamPlayer3D" parent="SeedDetector"]
stream = ExtResource( 12 )
bus = "getSeed"

[node name="SeagullOrbit" type="Spatial" parent="."]
transform = Transform( -0.517895, 0, -0.855445, 0, 1, 0, 0.855445, 0, -0.517895, 0, 30, 0 )
transform = Transform( 0.998575, 0, 0.0533729, 0, 1, 0, -0.0533729, 0, 0.998575, 0, 30, 0 )
script = SubResource( 26 )
speed = 0.5

@@ -464,7 +502,7 @@ autoplay = true
bus = "Music"

[node name="CreakSound" type="Spatial" parent="."]
script = SubResource( 28 )
script = SubResource( 33 )

[node name="Timer" type="Timer" parent="CreakSound"]
wait_time = 5.0
@@ -475,13 +513,6 @@ transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -2.19563, 8.60105, 0 )
bus = "Creaks"
script = ExtResource( 6 )
streams = [ ExtResource( 7 ), ExtResource( 8 ), ExtResource( 9 ), ExtResource( 10 ) ]
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

[node name="Plants" type="Spatial" parent="."]

@@ -565,3 +596,4 @@ type = 4
[connection signal="body_entered" from="WaterDetector" to="WaterDetector" method="_on_body_entered"]
[connection signal="body_entered" from="FertilizerDetector" to="FertilizerDetector" method="_on_body_entered"]
[connection signal="body_entered" from="SeedDetector" to="SeedDetector" method="_on_body_entered"]
[connection signal="timeout" from="CreakSound/Timer" to="CreakSound" method="_on_Timer_timeout"]

+ 12
- 0
scenes/sub_scenes/satzkasten.tscn View File

@@ -12,6 +12,8 @@
[ext_resource path="res://scenes/sub_scenes/plants/plant_seedling_export.tscn" type="PackedScene" id=10]
[ext_resource path="res://scenes/sub_scenes/fertilizer_logo.tscn" type="PackedScene" id=11]
[ext_resource path="res://scenes/sub_scenes/water_logo.tscn" type="PackedScene" id=12]
[ext_resource path="res://assets/plant_engine.gd" type="Script" id=13]
[ext_resource path="res://assets/sound/Plant_Propulsion_Loop.ogg" type="AudioStream" id=14]

[sub_resource type="GDScript" id=1]
script/source = "extends StaticBody
@@ -244,10 +246,20 @@ visible = false
[node name="engineBack" parent="Plants" instance=ExtResource( 4 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 11.6043, -7.17356, 6.73372 )
visible = false
script = ExtResource( 13 )

[node name="AudioStreamPlayer3D" type="AudioStreamPlayer3D" parent="Plants/engineBack"]
stream = ExtResource( 14 )
bus = "Engine"

[node name="engineFront" parent="Plants" instance=ExtResource( 4 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, -1, 11.6208, -7.17356, -6.78543 )
visible = false
script = ExtResource( 13 )

[node name="AudioStreamPlayer3D" type="AudioStreamPlayer3D" parent="Plants/engineFront"]
stream = ExtResource( 14 )
bus = "Engine"

[node name="oxygen" parent="Plants" instance=ExtResource( 8 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.869237, 0 )


Loading…
Cancel
Save