Add some walkie talkie sounds
This commit is contained in:
parent
13c962b8f6
commit
272fcc390f
|
@ -0,0 +1,6 @@
|
|||
https://freesound.org/people/stomachache/sounds/53266/
|
||||
https://freesound.org/people/davidou/sounds/88449/
|
||||
https://freesound.org/people/DanJFilms/sounds/529388/
|
||||
https://freesound.org/people/InspectorJ/sounds/485420/
|
||||
https://freesound.org/people/deadrobotmusic/sounds/555462/
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
source_md5="3a305e912fa89b6c23353d1e33a1e67a"
|
||||
dest_md5="181362e042d7c2be80ae2884c062bbaa"
|
||||
|
Binary file not shown.
|
@ -0,0 +1,3 @@
|
|||
source_md5="ace676fe7e4f24bdbf032aa00230af74"
|
||||
dest_md5="6221cf041bb9d666bad1929ab6455e8e"
|
||||
|
Binary file not shown.
|
@ -0,0 +1,3 @@
|
|||
source_md5="1d4ca3067ebf1c9e78e1186dc7d2bdf9"
|
||||
dest_md5="a36af739bfbe7506149dbdeb9222249b"
|
||||
|
Binary file not shown.
|
@ -0,0 +1,3 @@
|
|||
source_md5="0796e1c356c44061f1585c69c4268e53"
|
||||
dest_md5="d61ae818bf5cc83a29ef281a4864eb98"
|
||||
|
Binary file not shown.
|
@ -0,0 +1,3 @@
|
|||
source_md5="3b00d19524f66139ff9ed8d84a086ee3"
|
||||
dest_md5="249c8e0d07c178efeb21032a31e2ed07"
|
||||
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,15 @@
|
|||
[remap]
|
||||
|
||||
importer="ogg_vorbis"
|
||||
type="AudioStreamOGGVorbis"
|
||||
path="res://.import/buzz_static.ogg-0b07e5f14753859848a9c30f5b291e46.oggstr"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/audio/walkie_talkie/buzz_static.ogg"
|
||||
dest_files=[ "res://.import/buzz_static.ogg-0b07e5f14753859848a9c30f5b291e46.oggstr" ]
|
||||
|
||||
[params]
|
||||
|
||||
loop=true
|
||||
loop_offset=0
|
Binary file not shown.
|
@ -0,0 +1,15 @@
|
|||
[remap]
|
||||
|
||||
importer="ogg_vorbis"
|
||||
type="AudioStreamOGGVorbis"
|
||||
path="res://.import/high_whale.ogg-48d354f55ee014cb0a5286b1f3370c6c.oggstr"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/audio/walkie_talkie/high_whale.ogg"
|
||||
dest_files=[ "res://.import/high_whale.ogg-48d354f55ee014cb0a5286b1f3370c6c.oggstr" ]
|
||||
|
||||
[params]
|
||||
|
||||
loop=true
|
||||
loop_offset=0
|
Binary file not shown.
|
@ -0,0 +1,15 @@
|
|||
[remap]
|
||||
|
||||
importer="ogg_vorbis"
|
||||
type="AudioStreamOGGVorbis"
|
||||
path="res://.import/low_whale_one.ogg-a0d08574bcb169191faa5efc68b2178c.oggstr"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/audio/walkie_talkie/low_whale_one.ogg"
|
||||
dest_files=[ "res://.import/low_whale_one.ogg-a0d08574bcb169191faa5efc68b2178c.oggstr" ]
|
||||
|
||||
[params]
|
||||
|
||||
loop=true
|
||||
loop_offset=0
|
Binary file not shown.
|
@ -0,0 +1,15 @@
|
|||
[remap]
|
||||
|
||||
importer="ogg_vorbis"
|
||||
type="AudioStreamOGGVorbis"
|
||||
path="res://.import/talk.ogg-abea439d59f87a9e2ac7d961d89b3f90.oggstr"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/audio/walkie_talkie/talk.ogg"
|
||||
dest_files=[ "res://.import/talk.ogg-abea439d59f87a9e2ac7d961d89b3f90.oggstr" ]
|
||||
|
||||
[params]
|
||||
|
||||
loop=true
|
||||
loop_offset=0
|
Binary file not shown.
|
@ -0,0 +1,15 @@
|
|||
[remap]
|
||||
|
||||
importer="ogg_vorbis"
|
||||
type="AudioStreamOGGVorbis"
|
||||
path="res://.import/white_noise_static.ogg-eaabccf998e61660a6b2b735e6fefe29.oggstr"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/audio/walkie_talkie/white_noise_static.ogg"
|
||||
dest_files=[ "res://.import/white_noise_static.ogg-eaabccf998e61660a6b2b735e6fefe29.oggstr" ]
|
||||
|
||||
[params]
|
||||
|
||||
loop=true
|
||||
loop_offset=0
|
BIN
godot/assets/models/walkie_talkie/LCDScreen.material (Stored with Git LFS)
BIN
godot/assets/models/walkie_talkie/LCDScreen.material (Stored with Git LFS)
Binary file not shown.
|
@ -2,13 +2,56 @@ extends Spatial
|
|||
|
||||
var active = false
|
||||
onready var fsm: AnimationNodeStateMachinePlayback = $Animations/AnimationTree.get("parameters/playback")
|
||||
export var default_screen_color = Color(226, 255, 0, 255)
|
||||
export var screen_off_color = Color(0.0, 0.0, 0.0)
|
||||
var is_screen_on: bool
|
||||
|
||||
# Screen flicker is buggy it glitches and does new things when you modify the albedo colour
|
||||
# Seems like a Godot bug
|
||||
|
||||
func _ready():
|
||||
is_screen_on = false
|
||||
turn_screen_off()
|
||||
|
||||
func turn_screen_off():
|
||||
var mat = $Animations/walkie_talkie/Body.get_active_material(1)
|
||||
#mat.albedo_color = screen_off_color
|
||||
#mat.emission_enabled = false
|
||||
is_screen_on = false
|
||||
|
||||
func turn_screen_on():
|
||||
var mat = $Animations/walkie_talkie/Body.get_active_material(1)
|
||||
#mat.albedo_color = default_screen_color
|
||||
#mat.emission_enabled = true
|
||||
is_screen_on = true
|
||||
|
||||
func toggle_screen():
|
||||
if is_screen_on:
|
||||
turn_screen_off()
|
||||
else:
|
||||
turn_screen_on()
|
||||
|
||||
func toggle():
|
||||
if active:
|
||||
fsm.travel("WalkieTalkieLeave")
|
||||
$StaticBuzz.stop()
|
||||
$StaticFizz.stop()
|
||||
$Talk.stop()
|
||||
$Whale1.stop()
|
||||
$Whale2.stop()
|
||||
turn_screen_off()
|
||||
else:
|
||||
fsm.start("WalkieTalkieEnter")
|
||||
if fsm.is_playing():
|
||||
fsm.travel("WalkieTalkieEnter")
|
||||
else:
|
||||
fsm.start("WalkieTalkieEnter")
|
||||
$StaticBuzz.play()
|
||||
$StaticFizz.play()
|
||||
$Talk.play()
|
||||
$Whale1.play()
|
||||
$Whale2.play()
|
||||
turn_screen_on()
|
||||
|
||||
active = not active
|
||||
|
||||
func put_away():
|
||||
|
@ -19,3 +62,8 @@ func put_away():
|
|||
func _process(_delta):
|
||||
if Input.is_action_just_pressed("toggle_walkie_talkie"):
|
||||
toggle()
|
||||
|
||||
|
||||
func _on_ScreenFlicker_timeout():
|
||||
if active:
|
||||
toggle_screen()
|
||||
|
|
|
@ -1,10 +1,15 @@
|
|||
[gd_scene load_steps=26 format=2]
|
||||
[gd_scene load_steps=33 format=2]
|
||||
|
||||
[ext_resource path="res://assets/models/walkie_talkie/LCDScreen.material" type="Material" id=1]
|
||||
[ext_resource path="res://assets/models/walkie_talkie/WalkieTalkieSpeaker.material" type="Material" id=2]
|
||||
[ext_resource path="res://assets/models/walkie_talkie/MetalBody.material" type="Material" id=3]
|
||||
[ext_resource path="res://assets/models/walkie_talkie/WalkieTalkieKnob.material" type="Material" id=4]
|
||||
[ext_resource path="res://assets/models/walkie_talkie/walkie_talkie.gd" type="Script" id=5]
|
||||
[ext_resource path="res://assets/audio/walkie_talkie/low_whale_one.ogg" type="AudioStream" id=6]
|
||||
[ext_resource path="res://assets/audio/walkie_talkie/buzz_static.ogg" type="AudioStream" id=7]
|
||||
[ext_resource path="res://assets/audio/walkie_talkie/white_noise_static.ogg" type="AudioStream" id=8]
|
||||
[ext_resource path="res://assets/audio/walkie_talkie/talk.ogg" type="AudioStream" id=9]
|
||||
[ext_resource path="res://assets/audio/walkie_talkie/high_whale.ogg" type="AudioStream" id=10]
|
||||
|
||||
[sub_resource type="Animation" id=1]
|
||||
resource_name = "WalkieTalkieEnter"
|
||||
|
@ -80,17 +85,23 @@ xfade_time = 0.5
|
|||
[sub_resource type="AnimationNodeStateMachineTransition" id=33]
|
||||
xfade_time = 0.5
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id=34]
|
||||
xfade_time = 0.1
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id=35]
|
||||
xfade_time = 0.1
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachine" id=18]
|
||||
states/WalkieTalkieEnter/node = SubResource( 24 )
|
||||
states/WalkieTalkieEnter/position = Vector2( 183, 294 )
|
||||
states/WalkieTalkieEnter/position = Vector2( 184, 280 )
|
||||
states/WalkieTalkieIdle/node = SubResource( 25 )
|
||||
states/WalkieTalkieIdle/position = Vector2( 380, 113 )
|
||||
states/WalkieTalkieLeave/node = SubResource( 26 )
|
||||
states/WalkieTalkieLeave/position = Vector2( 123, -28 )
|
||||
states/WalkieTalkieWalking/node = SubResource( 27 )
|
||||
states/WalkieTalkieWalking/position = Vector2( 681, 113 )
|
||||
transitions = [ "WalkieTalkieEnter", "WalkieTalkieIdle", SubResource( 28 ), "WalkieTalkieIdle", "WalkieTalkieWalking", SubResource( 29 ), "WalkieTalkieWalking", "WalkieTalkieIdle", SubResource( 30 ), "WalkieTalkieIdle", "WalkieTalkieLeave", SubResource( 32 ), "WalkieTalkieWalking", "WalkieTalkieLeave", SubResource( 33 ) ]
|
||||
graph_offset = Vector2( -160, -215 )
|
||||
transitions = [ "WalkieTalkieEnter", "WalkieTalkieIdle", SubResource( 28 ), "WalkieTalkieIdle", "WalkieTalkieWalking", SubResource( 29 ), "WalkieTalkieWalking", "WalkieTalkieIdle", SubResource( 30 ), "WalkieTalkieIdle", "WalkieTalkieLeave", SubResource( 32 ), "WalkieTalkieWalking", "WalkieTalkieLeave", SubResource( 33 ), "WalkieTalkieLeave", "WalkieTalkieEnter", SubResource( 34 ), "WalkieTalkieEnter", "WalkieTalkieLeave", SubResource( 35 ) ]
|
||||
graph_offset = Vector2( -167, -115 )
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachinePlayback" id=19]
|
||||
|
||||
|
@ -239,7 +250,31 @@ light_specular = 1.5
|
|||
light_cull_mask = 4293919232
|
||||
omni_range = 0.449905
|
||||
|
||||
[node name="ScreenFlicker" type="Timer" parent="Animations/walkie_talkie/Body"]
|
||||
wait_time = 0.5
|
||||
autostart = true
|
||||
|
||||
[node name="BigKnob" type="MeshInstance" parent="Animations/walkie_talkie"]
|
||||
transform = Transform( 0.162289, -0.107564, 5.80247e-09, -5.80247e-09, -2.32099e-08, -0.194699, 0.107564, 0.162289, -2.32099e-08, 0.546791, 0.656719, -2.05382 )
|
||||
layers = 512
|
||||
mesh = SubResource( 23 )
|
||||
|
||||
[node name="StaticBuzz" type="AudioStreamPlayer" parent="."]
|
||||
stream = ExtResource( 7 )
|
||||
volume_db = 8.211
|
||||
|
||||
[node name="StaticFizz" type="AudioStreamPlayer" parent="."]
|
||||
stream = ExtResource( 8 )
|
||||
volume_db = 4.789
|
||||
|
||||
[node name="Talk" type="AudioStreamPlayer" parent="."]
|
||||
stream = ExtResource( 9 )
|
||||
volume_db = 3.421
|
||||
|
||||
[node name="Whale1" type="AudioStreamPlayer" parent="."]
|
||||
stream = ExtResource( 6 )
|
||||
|
||||
[node name="Whale2" type="AudioStreamPlayer" parent="."]
|
||||
stream = ExtResource( 10 )
|
||||
|
||||
[connection signal="timeout" from="Animations/walkie_talkie/Body/ScreenFlicker" to="." method="_on_ScreenFlicker_timeout"]
|
||||
|
|
Loading…
Reference in New Issue