Skip to content

Commit

Permalink
add sounds
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexey committed Jun 15, 2019
1 parent 54e6f39 commit 392914f
Show file tree
Hide file tree
Showing 40 changed files with 197 additions and 25 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source_md5="30effc14a8039855b864a03c145de002"
dest_md5="394406e5029e412fc5e47ba2136212a3"

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source_md5="c727a94ce972ce5fb71c7d44fda14ad1"
dest_md5="ed4e92a59daa403d461feaeaa87829ca"

Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source_md5="2092754683d497e9a6664e1f8e571e80"
dest_md5="c65962655987386cfcf6a1f0ae0c5139"

Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source_md5="b05cff092eedaeb477a76dd509f3a438"
dest_md5="eca71782afc1abeff4703b34d1300180"

Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source_md5="9e86e5621c1f1cbe3f697af31d3225c9"
dest_md5="934344f101f4131cff78460bd08b362e"

Binary file not shown.
3 changes: 3 additions & 0 deletions .import/game-over.ogg-6226ba03535d7e139cb247694dd3f6bf.md5
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source_md5="6e85136fed766b04991e9f37ed3f14e6"
dest_md5="5213f027cc76b73438cfc9afc80d54fa"

Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source_md5="224feefabe75d8cdb939398dcf16f427"
dest_md5="01623c0b55b037170b1b5cd5d65165ad"

Binary file not shown.
Binary file not shown.
3 changes: 3 additions & 0 deletions .import/pickup.ogg-c4f0e2fe8886a29c277ee484fbec6c1f.md5
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source_md5="e8adc3b9b207a8fe2c7b6673b231c8ef"
dest_md5="2317e98a0afdc237ec832b86fb28bbb6"

Binary file not shown.
Binary file added music/danke-8-bit-beat.ogg
Binary file not shown.
15 changes: 15 additions & 0 deletions music/danke-8-bit-beat.ogg.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[remap]

importer="ogg_vorbis"
type="AudioStreamOGGVorbis"
path="res://.import/danke-8-bit-beat.ogg-af2a66ff6ec617ac53bf9bca2c0d4190.oggstr"

[deps]

source_file="res://music/danke-8-bit-beat.ogg"
dest_files=[ "res://.import/danke-8-bit-beat.ogg-af2a66ff6ec617ac53bf9bca2c0d4190.oggstr" ]

[params]

loop=true
loop_offset=0
Binary file added music/decus-nutty-computer.ogg
Binary file not shown.
15 changes: 15 additions & 0 deletions music/decus-nutty-computer.ogg.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[remap]

importer="ogg_vorbis"
type="AudioStreamOGGVorbis"
path="res://.import/decus-nutty-computer.ogg-445a89182703d157f8a077c5b79a6652.oggstr"

[deps]

source_file="res://music/decus-nutty-computer.ogg"
dest_files=[ "res://.import/decus-nutty-computer.ogg-445a89182703d157f8a077c5b79a6652.oggstr" ]

[params]

loop=true
loop_offset=0
Binary file added music/game-over.ogg
Binary file not shown.
15 changes: 15 additions & 0 deletions music/game-over.ogg.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[remap]

importer="ogg_vorbis"
type="AudioStreamOGGVorbis"
path="res://.import/game-over.ogg-6226ba03535d7e139cb247694dd3f6bf.oggstr"

[deps]

source_file="res://music/game-over.ogg"
dest_files=[ "res://.import/game-over.ogg-6226ba03535d7e139cb247694dd3f6bf.oggstr" ]

[params]

loop=false
loop_offset=0
Binary file removed music/menu.ogg
Binary file not shown.
15 changes: 0 additions & 15 deletions music/menu.ogg.import

This file was deleted.

8 changes: 7 additions & 1 deletion scenes/Enemy.tscn
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
[gd_scene load_steps=9 format=2]
[gd_scene load_steps=10 format=2]

[ext_resource path="res://scripts/Enemy.gd" type="Script" id=1]
[ext_resource path="res://sprites/bc_0.png" type="Texture" id=2]
[ext_resource path="res://scripts/AnimatedTank.gd" type="Script" id=3]
[ext_resource path="res://sounds/enemy_explosion.wav" type="AudioStream" id=4]

[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 15.5, 15.5 )
Expand Down Expand Up @@ -107,11 +108,16 @@ wait_time = 2.0
one_shot = true

[node name="SpawnArea" type="Area2D" parent="."]
editor/display_folded = true
collision_layer = 15
collision_mask = 15

[node name="coll" type="CollisionShape2D" parent="SpawnArea"]
shape = SubResource( 5 )

[node name="Explode" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 4 )
volume_db = -12.0
[connection signal="animation_finished" from="spawnSprite/anim" to="." method="_on_anim_animation_finished"]
[connection signal="animation_finished" from="explode/anim" to="." method="_on_explode_animation_finished"]
[connection signal="area_entered" from="Area2D" to="." method="_on_Area2D_area_entered"]
Expand Down
8 changes: 7 additions & 1 deletion scenes/GameOver.tscn
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
[gd_scene load_steps=3 format=2]
[gd_scene load_steps=4 format=2]

[ext_resource path="res://scripts/GameOver.gd" type="Script" id=1]
[ext_resource path="res://sprites/game-over.png" type="Texture" id=2]
[ext_resource path="res://music/game-over.ogg" type="AudioStream" id=3]

[node name="Node2D" type="Node2D"]
script = ExtResource( 1 )
Expand Down Expand Up @@ -50,3 +51,8 @@ margin_right = 266.0
margin_bottom = 326.0
rect_scale = Vector2( 2, 2 )
text = "GAME OVER"

[node name="Sound" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 3 )
volume_db = -5.0
[connection signal="finished" from="Sound" to="." method="_on_AudioStreamPlayer_finished"]
16 changes: 15 additions & 1 deletion scenes/Main.tscn
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
[gd_scene load_steps=10 format=2]
[gd_scene load_steps=13 format=2]

[ext_resource path="res://scripts/Main.gd" type="Script" id=1]
[ext_resource path="res://scenes/Player.tscn" type="PackedScene" id=2]
[ext_resource path="res://scenes/Eagle.tscn" type="PackedScene" id=3]
[ext_resource path="res://scripts/ChangeStageUI.gd" type="Script" id=4]
[ext_resource path="res://music/decus-nutty-computer.ogg" type="AudioStream" id=5]
[ext_resource path="res://sounds/bortress_explosion.wav" type="AudioStream" id=6]
[ext_resource path="res://sounds/pickup.ogg" type="AudioStream" id=7]

[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 242, 8 )
Expand Down Expand Up @@ -182,6 +185,17 @@ one_shot = true

[node name="FirstSpawnTimer" type="Timer" parent="."]
one_shot = true

[node name="MisucPlayer" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 5 )

[node name="Sounds" type="Node" parent="."]

[node name="FortressExplode" type="AudioStreamPlayer" parent="Sounds"]
stream = ExtResource( 6 )

[node name="Pickup" type="AudioStreamPlayer" parent="Sounds"]
stream = ExtResource( 7 )
[connection signal="fortressDestroyed" from="Eagle" to="." method="_on_Eagle_fortressDestroyed"]
[connection signal="pressed" from="UI/TestButton" to="." method="_on_Button_pressed"]
[connection signal="endShowing" from="ChangeStageUI" to="." method="_on_ChangeStageUI_endShowing"]
Expand Down
8 changes: 6 additions & 2 deletions scenes/Menu.tscn
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[gd_scene load_steps=18 format=2]
[gd_scene load_steps=19 format=2]

[ext_resource path="res://scripts/Menu.gd" type="Script" id=1]
[ext_resource path="res://sprites/logo.png" type="Texture" id=2]
Expand All @@ -10,8 +10,9 @@
[ext_resource path="res://sprites/movie/movie_2.png" type="Texture" id=8]
[ext_resource path="res://sprites/movie/movie_3.png" type="Texture" id=9]
[ext_resource path="res://sprites/movie/movie_4.png" type="Texture" id=10]
[ext_resource path="res://music/menu.ogg" type="AudioStream" id=11]
[ext_resource path="res://music/danke-8-bit-beat.ogg" type="AudioStream" id=11]
[ext_resource path="res://sounds/menu_shot.ogg" type="AudioStream" id=12]
[ext_resource path="res://sounds/menu-navigate-00.wav" type="AudioStream" id=13]

[sub_resource type="SpriteFrames" id=1]
animations = [ {
Expand Down Expand Up @@ -177,5 +178,8 @@ autostart = true
[node name="Shot" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 12 )
volume_db = -5.0

[node name="SelectSound" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 13 )
[connection signal="animation_finished" from="Tank/fireSprite/anim" to="." method="_on_Fire_animation_finished"]
[connection signal="timeout" from="Timer" to="." method="_on_Timer_timeout"]
1 change: 1 addition & 0 deletions scripts/Enemy.gd
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ func explodeMe() :
motion = Vector2()
$movieTimer.stop()
$shotTimer.stop()
$Explode.play()

func freeze(timeout) :
isFreeze = true
Expand Down
7 changes: 5 additions & 2 deletions scripts/GameOver.gd
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@ extends Node2D
signal doExit

func _ready():
pass
$Sound.play()

func _process(delta):

if Input.is_action_just_pressed("ui_accept") :
emit_signal("doExit")
get_tree().change_scene("res://scenes/Menu.tscn")
get_tree().change_scene("res://scenes/Menu.tscn")

func _on_AudioStreamPlayer_finished():
$Sound.stop()
6 changes: 4 additions & 2 deletions scripts/Main.gd
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ func endStage():
else :
Global.saveGame(currentMapNum)
$ChangeStageUI.showed(currentMapNum)
$MisucPlayer.stop()


func _on_PlayerKilled():
print("KILLED")
lives -= 1
$UI/livesLabel.text = str(lives)
if lives == 0:
Expand Down Expand Up @@ -104,8 +104,10 @@ func onMapLoaded() :
$tank.respawn(tankPos)
$FirstSpawnTimer.start(2)
spawnEnemy()
$MisucPlayer.play()

func _on_Eagle_fortressDestroyed():
$Sounds/FortressExplode.play()
doGameOver()


Expand Down Expand Up @@ -151,7 +153,7 @@ func _on_fortressTimer_timeout():
protectFortress(false)

func _on_catchPowerUp(name) :
print("catch PowerUp ", name)
$Sounds/Pickup.play()
if name == "helmet" : #временное силовое поле, неуязвимость
$tank.setShield(true, 10)
elif name == "timer" : #замораживает врагов
Expand Down
6 changes: 5 additions & 1 deletion scripts/Menu.gd
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ func _ready():
$Tank/movieSprite/anim.play("move")
$Tank/anim.play("roll")

$MainTheme.play()

var gameData = Global.loadGame()
if gameData:
continueDisabled = !(gameData.stage > 1)
Expand All @@ -26,11 +28,13 @@ func _process(delta):
cursorIndex += 1
if cursorIndex >= 2:
cursorIndex = 2
$SelectSound.play()

if Input.is_action_just_pressed("ui_up") && canMove:
cursorIndex -= 1
if cursorIndex <= 0:
cursorIndex = 0
$SelectSound.play()

if Input.is_action_just_pressed("ui_accept") :

Expand Down Expand Up @@ -61,7 +65,7 @@ func selectItem():


func _on_Timer_timeout():
$MainTheme.play()
pass


func _on_Fire_animation_finished(anim_name):
Expand Down
Binary file added sounds/bortress_explosion.wav
Binary file not shown.
21 changes: 21 additions & 0 deletions sounds/bortress_explosion.wav.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[remap]

importer="wav"
type="AudioStreamSample"
path="res://.import/bortress_explosion.wav-b2868e3eef28a735c012355fbef0c03e.sample"

[deps]

source_file="res://sounds/bortress_explosion.wav"
dest_files=[ "res://.import/bortress_explosion.wav-b2868e3eef28a735c012355fbef0c03e.sample" ]

[params]

force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=true
edit/normalize=true
edit/loop=false
compress/mode=0
Binary file added sounds/enemy_explosion.wav
Binary file not shown.
21 changes: 21 additions & 0 deletions sounds/enemy_explosion.wav.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[remap]

importer="wav"
type="AudioStreamSample"
path="res://.import/enemy_explosion.wav-de461e7de558c77e96f8eecbeebfd464.sample"

[deps]

source_file="res://sounds/enemy_explosion.wav"
dest_files=[ "res://.import/enemy_explosion.wav-de461e7de558c77e96f8eecbeebfd464.sample" ]

[params]

force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=true
edit/normalize=true
edit/loop=false
compress/mode=0
Binary file added sounds/menu-navigate-00.wav
Binary file not shown.
21 changes: 21 additions & 0 deletions sounds/menu-navigate-00.wav.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[remap]

importer="wav"
type="AudioStreamSample"
path="res://.import/menu-navigate-00.wav-00f67736ca045ef4042b83b6f321cc8d.sample"

[deps]

source_file="res://sounds/menu-navigate-00.wav"
dest_files=[ "res://.import/menu-navigate-00.wav-00f67736ca045ef4042b83b6f321cc8d.sample" ]

[params]

force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=true
edit/normalize=true
edit/loop=false
compress/mode=0
Binary file added sounds/pickup.ogg
Binary file not shown.
15 changes: 15 additions & 0 deletions sounds/pickup.ogg.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[remap]

importer="ogg_vorbis"
type="AudioStreamOGGVorbis"
path="res://.import/pickup.ogg-c4f0e2fe8886a29c277ee484fbec6c1f.oggstr"

[deps]

source_file="res://sounds/pickup.ogg"
dest_files=[ "res://.import/pickup.ogg-c4f0e2fe8886a29c277ee484fbec6c1f.oggstr" ]

[params]

loop=false
loop_offset=0

0 comments on commit 392914f

Please sign in to comment.