Browse Source

fixed weird godot bug

Henrik
Pixdigit 3 months ago
parent
commit
716625d2d8
5 changed files with 30 additions and 13 deletions
  1. BIN
     
  2. +8
    -1
      scenes/Ship.tscn
  3. +4
    -4
      scenes/sub_scenes/Planet.tscn
  4. +15
    -8
      scenes/sub_scenes/Seagull.tscn
  5. +3
    -0
      scenes/sub_scenes/player.tscn

BIN
View File


+ 8
- 1
scenes/Ship.tscn View File

@@ -388,7 +388,7 @@ 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.951728, 0, 0.306938, 0, 1, 0, -0.306938, 0, 0.951728, 0, 30, 0 )
transform = Transform( -0.902268, 0, 0.43117, 0, 1, 0, -0.43117, 0, -0.902268, 0, 30, 0 )
script = SubResource( 26 )
speed = 0.5

@@ -415,6 +415,13 @@ autostart = true
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -2.19563, 8.60105, 0 )
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
[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="timeout" from="CreakSound/Timer" to="CreakSound" method="_on_Timer_timeout"]

+ 4
- 4
scenes/sub_scenes/Planet.tscn View File

@@ -24,15 +24,15 @@ gravity = Vector3( 0, 0, 0 )
initial_velocity_random = 0.1
color = Color( 0.705882, 0.290196, 0.290196, 1 )

[sub_resource type="SpatialMaterial" id=6]
[sub_resource type="SpatialMaterial" id=5]
flags_transparent = true
albedo_color = Color( 0.968627, 0.968627, 0.968627, 0.705882 )
rim_enabled = true
rim = 1.0
rim_tint = 0.5

[sub_resource type="SphereMesh" id=5]
material = SubResource( 6 )
[sub_resource type="SphereMesh" id=6]
material = SubResource( 5 )
radius = 0.2
height = 1.0
radial_segments = 37
@@ -52,4 +52,4 @@ amount = 50
lifetime = 15.0
preprocess = 54.03
process_material = SubResource( 4 )
draw_pass_1 = SubResource( 5 )
draw_pass_1 = SubResource( 6 )

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

@@ -8,31 +8,38 @@

[sub_resource type="CapsuleMesh" id=1]

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


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

func _on_Timer_timeout():
func _ready():
assert(audio != null)

func _on_timeout():
audio.play()
timer.start(State.rng.randf_range(3.0, 6.0))
start(State.rng.randf_range(3.0, 6.0))
"

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

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

[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 = 10.0
volume_max = 10.0
[connection signal="timeout" from="Timer" to="." method="_on_Timer_timeout"]
randomize_pitch = false
pitch_min = 1.0
pitch_max = 1.0
[connection signal="timeout" from="Timer" to="Timer" method="_on_timeout"]

+ 3
- 0
scenes/sub_scenes/player.tscn View File

@@ -102,4 +102,7 @@ random_strategy = 2
randomize_volume = true
volume_min = -80.0
volume_max = -80.0
randomize_pitch = false
pitch_min = 1.0
pitch_max = 1.0
[connection signal="timeout" from="Timer" to="." method="_on_Timer_timeout"]

Loading…
Cancel
Save