Browse Source

Merge branch 'max' into main

main
Pixdigit 3 months ago
parent
commit
82a4fa2072
43 changed files with 3820 additions and 90 deletions
  1. BIN
     
  2. +36
    -0
      assets/models/pirate/Pirate_AO.png.import
  3. BIN
     
  4. +36
    -0
      assets/models/pirate/Pirate_BaseColor.png.import
  5. BIN
     
  6. +36
    -0
      assets/models/pirate/Pirate_Metallic.png.import
  7. BIN
     
  8. +36
    -0
      assets/models/pirate/Pirate_Normal.png.import
  9. BIN
     
  10. +36
    -0
      assets/models/pirate/Pirate_Roughness.png.import
  11. +613
    -0
      assets/models/pirate/pirate_export-2.escn
  12. +1063
    -0
      assets/models/pirate/pirate_export-2.escn.import
  13. BIN
     
  14. BIN
     
  15. BIN
     
  16. BIN
     
  17. BIN
     
  18. +451
    -0
      assets/models/seagull/seagull.escn
  19. +1063
    -0
      assets/models/seagull/seagull.escn.import
  20. +13
    -0
      assets/plant_engine.gd
  21. BIN
     
  22. +15
    -0
      assets/sound/Bucket_Fill_mono.ogg.import
  23. BIN
     
  24. +15
    -0
      assets/sound/Door_Open_mono.ogg.import
  25. BIN
     
  26. +15
    -0
      assets/sound/Music_Menu_Intro.ogg.import
  27. BIN
     
  28. +15
    -0
      assets/sound/Music_Menu_Loop.ogg.import
  29. BIN
     
  30. +15
    -0
      assets/sound/Pickup_Sack_mono.ogg.import
  31. +1
    -1
      assets/sound/Plant_Grow_mono.ogg.import
  32. +1
    -0
      assets/sound/Readme.md
  33. +24
    -0
      default_bus_layout.tres
  34. +116
    -23
      scenes/Ship.tscn
  35. +12
    -1
      scenes/sub_scenes/OxygenBubble.tscn
  36. +7
    -7
      scenes/sub_scenes/Seagull.tscn
  37. +26
    -0
      scenes/sub_scenes/pirate_export-2.tscn
  38. +18
    -1
      scenes/sub_scenes/plants/plant_canon_export_Actions.tscn
  39. +21
    -1
      scenes/sub_scenes/plants/plant_engine_export_left_fixed.tscn
  40. +48
    -41
      scenes/sub_scenes/player.tscn
  41. +76
    -14
      scenes/sub_scenes/satzkasten.tscn
  42. +5
    -0
      scenes/sub_scenes/seagull_inherit.tscn
  43. +7
    -1
      src/State.gd

BIN
View File


+ 36
- 0
assets/models/pirate/Pirate_AO.png.import View File

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

importer="texture"
type="StreamTexture"
path.s3tc="res://.import/Pirate_AO.png-84824729e3be864f4c7965af31b861e7.s3tc.stex"
path.etc2="res://.import/Pirate_AO.png-84824729e3be864f4c7965af31b861e7.etc2.stex"
metadata={
"imported_formats": [ "s3tc", "etc2" ],
"vram_texture": true
}

[deps]

source_file="res://assets/models/pirate/Pirate_AO.png"
dest_files=[ "res://.import/Pirate_AO.png-84824729e3be864f4c7965af31b861e7.s3tc.stex", "res://.import/Pirate_AO.png-84824729e3be864f4c7965af31b861e7.etc2.stex" ]

[params]

compress/mode=2
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=true
flags/filter=true
flags/mipmaps=true
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

BIN
View File


+ 36
- 0
assets/models/pirate/Pirate_BaseColor.png.import View File

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

importer="texture"
type="StreamTexture"
path.s3tc="res://.import/Pirate_BaseColor.png-a8e824de49594160b1a3d3f63bb61ef8.s3tc.stex"
path.etc2="res://.import/Pirate_BaseColor.png-a8e824de49594160b1a3d3f63bb61ef8.etc2.stex"
metadata={
"imported_formats": [ "s3tc", "etc2" ],
"vram_texture": true
}

[deps]

source_file="res://assets/models/pirate/Pirate_BaseColor.png"
dest_files=[ "res://.import/Pirate_BaseColor.png-a8e824de49594160b1a3d3f63bb61ef8.s3tc.stex", "res://.import/Pirate_BaseColor.png-a8e824de49594160b1a3d3f63bb61ef8.etc2.stex" ]

[params]

compress/mode=2
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=true
flags/filter=true
flags/mipmaps=true
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

BIN
View File


+ 36
- 0
assets/models/pirate/Pirate_Metallic.png.import View File

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

importer="texture"
type="StreamTexture"
path.s3tc="res://.import/Pirate_Metallic.png-dfa426ce066c40b677ff3f5ff0c99cf4.s3tc.stex"
path.etc2="res://.import/Pirate_Metallic.png-dfa426ce066c40b677ff3f5ff0c99cf4.etc2.stex"
metadata={
"imported_formats": [ "s3tc", "etc2" ],
"vram_texture": true
}

[deps]

source_file="res://assets/models/pirate/Pirate_Metallic.png"
dest_files=[ "res://.import/Pirate_Metallic.png-dfa426ce066c40b677ff3f5ff0c99cf4.s3tc.stex", "res://.import/Pirate_Metallic.png-dfa426ce066c40b677ff3f5ff0c99cf4.etc2.stex" ]

[params]

compress/mode=2
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=true
flags/filter=true
flags/mipmaps=true
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

BIN
View File


+ 36
- 0
assets/models/pirate/Pirate_Normal.png.import View File

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

importer="texture"
type="StreamTexture"
path.s3tc="res://.import/Pirate_Normal.png-46f478743ec84d92f59a2d71aaa3f3e6.s3tc.stex"
path.etc2="res://.import/Pirate_Normal.png-46f478743ec84d92f59a2d71aaa3f3e6.etc2.stex"
metadata={
"imported_formats": [ "s3tc", "etc2" ],
"vram_texture": true
}

[deps]

source_file="res://assets/models/pirate/Pirate_Normal.png"
dest_files=[ "res://.import/Pirate_Normal.png-46f478743ec84d92f59a2d71aaa3f3e6.s3tc.stex", "res://.import/Pirate_Normal.png-46f478743ec84d92f59a2d71aaa3f3e6.etc2.stex" ]

[params]

compress/mode=2
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=1
flags/repeat=true
flags/filter=true
flags/mipmaps=true
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

BIN
View File


+ 36
- 0
assets/models/pirate/Pirate_Roughness.png.import View File

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

importer="texture"
type="StreamTexture"
path.s3tc="res://.import/Pirate_Roughness.png-6103d6898ae1fb0d8eeed52d39cd91fc.s3tc.stex"
path.etc2="res://.import/Pirate_Roughness.png-6103d6898ae1fb0d8eeed52d39cd91fc.etc2.stex"
metadata={
"imported_formats": [ "s3tc", "etc2" ],
"vram_texture": true
}

[deps]

source_file="res://assets/models/pirate/Pirate_Roughness.png"
dest_files=[ "res://.import/Pirate_Roughness.png-6103d6898ae1fb0d8eeed52d39cd91fc.s3tc.stex", "res://.import/Pirate_Roughness.png-6103d6898ae1fb0d8eeed52d39cd91fc.etc2.stex" ]

[params]

compress/mode=2
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=true
flags/filter=true
flags/mipmaps=true
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

+ 613
- 0
assets/models/pirate/pirate_export-2.escn
File diff suppressed because it is too large
View File


+ 1063
- 0
assets/models/pirate/pirate_export-2.escn.import
File diff suppressed because it is too large
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


+ 451
- 0
assets/models/seagull/seagull.escn
File diff suppressed because it is too large
View File


+ 1063
- 0
assets/models/seagull/seagull.escn.import
File diff suppressed because it is too large
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"

+ 116
- 23
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
@@ -124,7 +127,7 @@ func _on_steer_body_exited(body):

[sub_resource type="Curve3D" id=20]
_data = {
"points": PoolVector3Array( 2.89339, -5.11357, 18.9823, -2.89339, 5.11357, -18.9823, 16.1517, 29.7389, 24.163, 0, 0, 0, 0, 0, 0, -0.164474, 254.772, 3.75325 ),
"points": PoolVector3Array( 2.89339, -5.11357, 18.9823, -2.89339, 5.11357, -18.9823, 16.1517, 29.7389, 24.163, 0, 0, 0, 0, 0, 0, -0.23999, 109.07, 3.75325 ),
"tilts": PoolRealArray( 0, 0 )
}

@@ -173,19 +176,28 @@ height = 0.1
[sub_resource type="BoxShape" id=25]
extents = Vector3( 0.8, 2.16543, 0.8 )

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

export var speed: float

func _physics_process(delta):
rotation.y += speed * delta
"
[sub_resource type="Animation" id=26]
resource_name = "New Anim"
length = 10.0
loop = true
tracks/0/type = "value"
tracks/0/path = NodePath(".:rotation_degrees")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 10 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ Vector3( 0, 0, 0 ), Vector3( 0, 360, 0 ) ]
}

[sub_resource type="GDScript" id=27]
script/source = "extends Area

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

func _ready():
pass

@@ -193,6 +205,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 +214,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 +223,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 +232,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="."]
@@ -391,10 +424,10 @@ __meta__ = {
}

[node name="PathFollow" type="PathFollow" parent="AnimationPlayer/CameraPath"]
transform = Transform( 0.670962, 0.445052, 0.593066, 0.609955, -0.786076, -0.100168, 0.421623, 0.428955, -0.798889, 16.1517, 29.7389, 24.163 )
transform = Transform( 0.657749, 0.444549, 0.608051, 0.654843, -0.736401, -0.16997, 0.372217, 0.509978, -0.775479, 16.1517, 29.7389, 24.163 )

[node name="Camera" type="Camera" parent="AnimationPlayer/CameraPath/PathFollow"]
transform = Transform( 0.367442, 0.138072, 0.919741, 0.168566, -0.982425, 0.0801399, 0.914642, 0.12559, -0.38426, 0, 0, 0 )
transform = Transform( 0.380903, 0.202422, 0.902186, 0.127339, -0.977926, 0.165654, 0.915803, 0.0517854, -0.398273, 0, 0, 0 )
current = true
far = 300.0
script = SubResource( 21 )
@@ -405,7 +438,7 @@ transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 100, 0, 0 )
amount = 1000
lifetime = 20.0
preprocess = 20.0
visibility_aabb = AABB( -201.095, -100.1, -99.9444, 202.151, 200.179, 199.996 )
visibility_aabb = AABB( -201.087, -40.0732, -59.9773, 202.177, 80.1695, 120.026 )
process_material = SubResource( 22 )
draw_pass_1 = SubResource( 24 )

@@ -421,12 +454,14 @@ transform = Transform( 1, 0, 0, 0, -0.416456, -0.909156, 0, 0.909156, -0.416456,
light_energy = 0.2

[node name="SeagullOrbit" type="Spatial" parent="."]
transform = Transform( -0.963966, 0, 0.266016, 0, 1, 0, -0.266016, 0, -0.963966, 0, 30, 0 )
script = SubResource( 26 )
speed = 0.0
transform = Transform( -0.747961, 0, 0.663739, 0, 1, 0, -0.663739, 0, -0.747961, 0, 30, 0 )

[node name="Gull Dummy" parent="SeagullOrbit" instance=ExtResource( 3 )]

[node name="AnimationPlayer2" type="AnimationPlayer" parent="SeagullOrbit"]
autoplay = "New Anim"
"anims/New Anim" = SubResource( 26 )

[node name="WaterDetector" type="Area" parent="."]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -9.99335, 9.65661, -0.110578 )
script = SubResource( 27 )
@@ -434,6 +469,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 +481,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,10 +493,9 @@ 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="SeagullOrbit" type="Spatial" parent="."]
transform = Transform( 0.874581, 0, -0.48488, 0, 1, 0, 0.48488, 0, 0.874581, 0, 30, 0 )
script = SubResource( 26 )
speed = 0.5
[node name="AudioStreamPlayer3D" type="AudioStreamPlayer3D" parent="SeedDetector"]
stream = ExtResource( 12 )
bus = "getSeed"

[node name="Bubble" parent="." instance=ExtResource( 5 )]
transform = Transform( 30, 0, 0, 0, 25, 0, 0, 0, 25, -2.66053, 15.0877, 0 )
@@ -464,7 +506,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
@@ -498,20 +540,71 @@ transform = Transform( -1.62921e-07, 0, -1, 0, 1, 0, 1, 0, -1.62921e-07, 11.2304
type = 3

[node name="Quad" type="Spatial" parent="Plants"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -3.69396, 10.9869, 13.4172 )
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -7, 8, 4.221 )

[node name="satzkasten" parent="Plants/Quad" instance=ExtResource( 4 )]

[node name="satzkasten2" parent="Plants/Quad" instance=ExtResource( 4 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 2.5 )
type = 4

[node name="satzkasten3" parent="Plants/Quad" instance=ExtResource( 4 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 2.5, 0, 2.5 )
type = 4

[node name="satzkasten4" parent="Plants/Quad" instance=ExtResource( 4 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 2.5, 0, 0 )

[node name="Quad2" type="Spatial" parent="Plants"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 8.03608, 4.221 )

[node name="satzkasten" parent="Plants/Quad2" instance=ExtResource( 4 )]

[node name="satzkasten2" parent="Plants/Quad2" instance=ExtResource( 4 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 2.5 )
type = 4

[node name="satzkasten3" parent="Plants/Quad2" instance=ExtResource( 4 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 2.5, 0, 2.5 )
type = 4

[node name="satzkasten4" parent="Plants/Quad2" instance=ExtResource( 4 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 2.5, 0, 0 )

[node name="Quad3" type="Spatial" parent="Plants"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -7, 8, -7.277 )

[node name="satzkasten" parent="Plants/Quad3" instance=ExtResource( 4 )]
type = 4

[node name="satzkasten2" parent="Plants/Quad3" instance=ExtResource( 4 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 2.5 )

[node name="satzkasten3" parent="Plants/Quad3" instance=ExtResource( 4 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 2.5, 0, 2.5 )

[node name="satzkasten4" parent="Plants/Quad3" instance=ExtResource( 4 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 2.5, 0, 0 )
type = 4

[node name="Quad4" type="Spatial" parent="Plants"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 8.03608, -7.277 )

[node name="satzkasten" parent="Plants/Quad4" instance=ExtResource( 4 )]
type = 4

[node name="satzkasten2" parent="Plants/Quad4" instance=ExtResource( 4 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 2.5 )

[node name="satzkasten3" parent="Plants/Quad4" instance=ExtResource( 4 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 2.5, 0, 2.5 )

[node name="satzkasten4" parent="Plants/Quad4" instance=ExtResource( 4 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 2.5, 0, 0 )
type = 4
[connection signal="body_entered" from="AnimationPlayer/Area" to="AnimationPlayer" method="_on_steer_body_entered"]
[connection signal="body_exited" from="AnimationPlayer/Area" to="AnimationPlayer" method="_on_steer_body_exited"]
[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
- 1
scenes/sub_scenes/OxygenBubble.tscn View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=20 format=2]
[gd_scene load_steps=21 format=2]

[sub_resource type="SphereMesh" id=1]

@@ -157,8 +157,19 @@ nodes/fragment/connections = PoolIntArray( 10, 0, 11, 0, 11, 0, 2, 3, 15, 0, 10,
shader = SubResource( 18 )
shader_param/Color = Color( 0.4, 0.827451, 1, 1 )

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

func _ready():
pass

func _process(_delta):
scale = State.o2 * Vector3(1, 1, 1)
"

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

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

+ 7
- 7
scenes/sub_scenes/Seagull.tscn View File

@@ -5,10 +5,9 @@
[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]
[ext_resource path="res://scenes/sub_scenes/seagull_inherit.tscn" type="PackedScene" id=6]

[sub_resource type="CapsuleMesh" id=1]

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


@@ -22,15 +21,13 @@ func _on_timeout():
start(State.rng.randf_range(3.0, 6.0))
"

[node name="Gull Dummy" type="MeshInstance"]
[node name="Gull Dummy" type="Spatial"]
transform = Transform( 0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.7, 15, 0, 0 )
mesh = SubResource( 1 )
material/0 = null

[node name="Timer" type="Timer" parent="."]
wait_time = 3.0
autostart = true
script = SubResource( 2 )
script = SubResource( 1 )

[node name="RandomAudioStreamPlayer3D" type="AudioStreamPlayer3D" parent="."]
bus = "Seagull"
@@ -43,4 +40,7 @@ volume_max = 10.0
randomize_pitch = false
pitch_min = 1.0
pitch_max = 1.0

[node name="seagull" parent="." instance=ExtResource( 6 )]
transform = Transform( 1.7534, -0.962069, 0, 0.962069, 1.7534, 0, 0, 0, 2, 0, 0, 0 )
[connection signal="timeout" from="Timer" to="Timer" method="_on_timeout"]

+ 26
- 0
scenes/sub_scenes/pirate_export-2.tscn View File

@@ -0,0 +1,26 @@
[gd_scene load_steps=3 format=2]

[ext_resource path="res://assets/models/pirate/pirate_export-2.escn" type="PackedScene" id=1]

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


func _ready():
var child2 = get_node(\"AnimationPlayer\")
var anim_name = child2.get_animation_list()[0]
var anim = child2.get_animation(anim_name)
anim.length = 1.3333333
anim.loop = true
child2.add_animation(\"anim\", anim)
child2.current_animation = \"anim\"
child2.play()


"

[node name="pirate_export-2" instance=ExtResource( 1 )]
script = SubResource( 1 )

[node name="Bone016BoneAttachment" parent="Armature" index="1"]
transform = Transform( 1, 2.38419e-07, -1.04794e-13, 1.77636e-15, 0, -1, -2.38419e-07, 1, 0, 2.7195e-14, 4.58208, -1.49384e-06 )

+ 18
- 1
scenes/sub_scenes/plants/plant_canon_export_Actions.tscn View File

@@ -1,6 +1,23 @@
[gd_scene load_steps=2 format=2]
[gd_scene load_steps=3 format=2]

[ext_resource path="res://assets/models/plants/canon/plant_canon_export_Actions.escn" type="PackedScene" id=1]

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

func _ready():
var child2 = get_node(\"AnimationPlayer\")
var anim_name = child2.get_animation_list()[1]
var anim = child2.get_animation(anim_name)
anim.length = 1.3333333
anim.loop = true
child2.add_animation(\"anim\", anim)
child2.current_animation = \"anim\"
child2.play()


"

[node name="plant_canon_export_Actions" instance=ExtResource( 1 )]
transform = Transform( 0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0, 0 )
script = SubResource( 1 )

+ 21
- 1
scenes/sub_scenes/plants/plant_engine_export_left_fixed.tscn View File

@@ -1,5 +1,25 @@
[gd_scene load_steps=2 format=2]
[gd_scene load_steps=3 format=2]

[ext_resource path="res://assets/models/plants/engine/plant_engine_export_left_fixed.escn" type="PackedScene" id=1]

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

func _ready():
var child2 = get_node(\"AnimationPlayer\")
var anim_name = child2.get_animation_list()[0]
var anim = child2.get_animation(anim_name)
anim.loop = true
anim.length = 1.3333333
child2.add_animation(\"anim\", anim)
child2.current_animation = \"anim\"
child2.play()


"

[node name="plant_engine_export_left_fixed" instance=ExtResource( 1 )]
script = SubResource( 1 )

[node name="AnimationPlayer" parent="." index="1"]
autoplay = "Antenna_1_RigAction.001"

+ 48
- 41
scenes/sub_scenes/player.tscn View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=13 format=2]
[gd_scene load_steps=12 format=2]

[ext_resource path="res://addons/randomAudioStreamPlayer/random_audio_stream_player_3D.gd" type="Script" id=1]
[ext_resource path="res://assets/sound/Steps/Metal_Footstep_02_mono.ogg" type="AudioStream" id=2]
@@ -6,6 +6,8 @@
[ext_resource path="res://assets/sound/Steps/Metal_Footstep_03_mono.ogg" type="AudioStream" id=4]
[ext_resource path="res://scenes/sub_scenes/fertilizer_logo.tscn" type="PackedScene" id=5]
[ext_resource path="res://scenes/sub_scenes/water_logo.tscn" type="PackedScene" id=6]
[ext_resource path="res://scenes/sub_scenes/pirate_export-2.tscn" type="PackedScene" id=7]
[ext_resource path="res://scenes/sub_scenes/plants/plant_seedling_export.tscn" type="PackedScene" id=8]

[sub_resource type="GDScript" id=1]
script/source = "extends KinematicBody
@@ -20,9 +22,10 @@ var gravity : Vector3 = Vector3(0,-0.9,0)

onready var audio = get_node(\"RandomAudioStreamPlayer3D\")
onready var stepTimer = get_node(\"Timer\")
onready var fertilizer_logo = get_node(\"FertilizerLogo\")
onready var water_logo = get_node(\"WaterLogo\")
#onready var seed_logo = get_node(\"SeedLogo\")
onready var mesh = get_node(\"MeshInstance\")
onready var fertilizer_logo = find_node(\"FertilizerLogo\")
onready var water_logo = find_node(\"WaterLogo\")
onready var seed_logo = find_node(\"SeedLogo\")

func _ready():
var err = State.connect(\"item_changed\", self, \"_on_item_changed\")
@@ -31,13 +34,14 @@ func _ready():
func _on_item_changed():
water_logo.visible = false
fertilizer_logo.visible = false
seed_logo.visible = false

if State.player_inventory == State.ITEM.WATER:
water_logo.visible = true
elif State.player_inventory == State.ITEM.FERTILIZER:
fertilizer_logo.visible = true
elif State.player_inventory == State.ITEM.SEED:
pass # TODO seed_logo.visible = true
seed_logo.visible = true

func _physics_process(_delta):
@@ -90,23 +94,30 @@ func _on_Timer_timeout():


func smoothRotating(rot : float):
var targetRotation = lerp_angle(deg2rad(rotation_degrees.y), deg2rad(rot), 0.2)
rotation_degrees.y = rad2deg(targetRotation)
var targetRotation = lerp_angle(deg2rad(mesh.rotation_degrees.y), deg2rad(rot), 0.2)
mesh.rotation_degrees.y = rad2deg(targetRotation)
"

[sub_resource type="CapsuleMesh" id=2]
mid_height = 2.0

[sub_resource type="SpatialMaterial" id=3]
albedo_color = Color( 0.760784, 0.576471, 0.4, 1 )

[sub_resource type="SphereMesh" id=4]

[sub_resource type="SpatialMaterial" id=5]
albedo_color = Color( 0.968627, 0.282353, 0.282353, 1 )

[sub_resource type="CapsuleShape" id=6]
height = 2.0
[sub_resource type="CylinderShape" id=2]
radius = 0.925012
height = 3.19668

[sub_resource type="Animation" id=3]
resource_name = "New Anim"
length = 1.5
loop = true
tracks/0/type = "value"
tracks/0/path = NodePath(".:rotation_degrees")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 1.5 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ Vector3( 0, 0, 0 ), Vector3( 0, 360, 0 ) ]
}

[node name="Player" type="KinematicBody"]
script = SubResource( 1 )
@@ -114,22 +125,11 @@ __meta__ = {
"_edit_group_": true
}

[node name="MeshInstance" type="MeshInstance" parent="."]
transform = Transform( 1, 0, 0, 0, -1.62921e-07, -1, 0, 1, -1.62921e-07, 0, 0, 0 )
mesh = SubResource( 2 )
material/0 = SubResource( 3 )

[node name="MeshInstance" type="MeshInstance" parent="MeshInstance"]
transform = Transform( 0.2, 0, 0, 0, 0.2, 0, 0, 0, 0.2, 0, 1.08105, -0.750059 )
mesh = SubResource( 4 )
material/0 = SubResource( 5 )
[node name="MeshInstance" parent="." instance=ExtResource( 7 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1.70661, 0 )

[node name="CollisionShape" type="CollisionShape" parent="."]
transform = Transform( 1, 0, 0, 0, -1.62921e-07, -1, 0, 1, -1.62921e-07, 0, 0, 0 )
shape = SubResource( 6 )

[node name="Listener" type="Listener" parent="."]
current = true
shape = SubResource( 2 )

[node name="Timer" type="Timer" parent="."]
wait_time = 0.3
@@ -147,17 +147,24 @@ randomize_pitch = false
pitch_min = 1.0
pitch_max = 1.0

[node name="FertilizerLogo" parent="." instance=ExtResource( 5 )]
[node name="Listener" type="Listener" parent="."]

[node name="Spatial" type="Spatial" parent="."]
transform = Transform( 0.953008, 0, -0.302946, 0, 1, 0, 0.302946, 0, 0.953008, 0, 0, 0 )

[node name="AnimationPlayer" type="AnimationPlayer" parent="Spatial"]
autoplay = "New Anim"
"anims/New Anim" = SubResource( 3 )

[node name="FertilizerLogo" parent="Spatial" instance=ExtResource( 5 )]
transform = Transform( 0.41941, 0, 0.907797, 0, 1, 0, -0.907797, 0, 0.41941, 0, 3, 0 )
visible = false

[node name="AnimationPlayer" type="AnimationPlayer" parent="FertilizerLogo"]
autoplay = "rotate"

[node name="WaterLogo" parent="." instance=ExtResource( 6 )]
[node name="WaterLogo" parent="Spatial" instance=ExtResource( 6 )]
transform = Transform( 0.901675, 0, -0.432413, 0, 1, 0, 0.432413, 0, 0.901675, 0, 3, 0 )
visible = false

[node name="AnimationPlayer2" type="AnimationPlayer" parent="WaterLogo"]
autoplay = "rotate"
[node name="SeedLogo" parent="Spatial" instance=ExtResource( 8 )]
transform = Transform( -0.978147, 0, -0.207916, 0, 1, 0, 0.207916, 0, -0.978147, 0, 2.17165, 0 )
visible = false
[connection signal="timeout" from="Timer" to="." method="_on_Timer_timeout"]

+ 76
- 14
scenes/sub_scenes/satzkasten.tscn
File diff suppressed because it is too large
View File


+ 5
- 0
scenes/sub_scenes/seagull_inherit.tscn View File

@@ -0,0 +1,5 @@
[gd_scene load_steps=2 format=2]

[ext_resource path="res://assets/models/seagull/seagull.escn" type="PackedScene" id=1]

[node name="seagull" instance=ExtResource( 1 )]

+ 7
- 1
src/State.gd View File

@@ -30,7 +30,9 @@ enum ITEM {

var rng: RandomNumberGenerator = RandomNumberGenerator.new()

var o2: float = 0
var o2: float = 1
var o2_drain: float = 0.003
var o2_gain: float = 0.0006

var selected_plant: Spatial = null
var player_inventory: int = ITEM.EMPTY setget set_item
@@ -55,3 +57,7 @@ func _input(_event):
if Input.is_action_just_pressed("Interact"):
if selected_plant != null:
selected_plant.interact()

func _process(delta):
var net_gain = plant_amounts[PLANT_TYPE.O2] * o2_gain - o2_drain
o2 = min(o2 + net_gain * delta, 1)

Loading…
Cancel
Save