[ADD] implemented sounds
This commit is contained in:
parent
afa8f09aaf
commit
f3c1a001c6
@ -1,7 +1,8 @@
|
||||
[gd_scene load_steps=3 format=2]
|
||||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://Scripts/EndGameWindow.gd" type="Script" id=1]
|
||||
[ext_resource path="res://Font/COMIC.tres" type="DynamicFont" id=2]
|
||||
[ext_resource path="res://Sounds/PaintJamEndGameTheme.wav" type="AudioStream" id=3]
|
||||
|
||||
[node name="CanvasLayer" type="CanvasLayer"]
|
||||
layer = 100
|
||||
@ -98,5 +99,9 @@ size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
custom_fonts/font = ExtResource( 2 )
|
||||
text = "Quit"
|
||||
|
||||
[node name="EndGameTheme" type="AudioStreamPlayer2D" parent="."]
|
||||
pause_mode = 2
|
||||
stream = ExtResource( 3 )
|
||||
[connection signal="pressed" from="Window/ColorRect/VBoxContainer/RestartButton" to="Window" method="_on_RestartButton_pressed"]
|
||||
[connection signal="pressed" from="Window/ColorRect/VBoxContainer/QuitButton" to="Window" method="_on_QuitButton_pressed"]
|
||||
|
@ -1,10 +1,11 @@
|
||||
[gd_scene load_steps=7 format=2]
|
||||
[gd_scene load_steps=8 format=2]
|
||||
|
||||
[ext_resource path="res://Assets/Tiling/Tileset.tres" type="TileSet" id=1]
|
||||
[ext_resource path="res://Scene/Player.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://Scene/HealthBar.tscn" type="PackedScene" id=3]
|
||||
[ext_resource path="res://Scene/EndGameWindow.tscn" type="PackedScene" id=4]
|
||||
[ext_resource path="res://Scene/GameManager.tscn" type="PackedScene" id=5]
|
||||
[ext_resource path="res://Sounds/PaintJamMainTheme.wav" type="AudioStream" id=6]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=1]
|
||||
extents = Vector2( 991.884, 66.2394 )
|
||||
@ -120,3 +121,7 @@ position = Vector2( 199.123, 592.532 )
|
||||
"spawn_point",
|
||||
]]
|
||||
position = Vector2( 1730.27, 580.843 )
|
||||
|
||||
[node name="MainTheme" type="AudioStreamPlayer2D" parent="."]
|
||||
stream = ExtResource( 6 )
|
||||
autoplay = true
|
||||
|
@ -1,8 +1,9 @@
|
||||
[gd_scene load_steps=28 format=2]
|
||||
[gd_scene load_steps=29 format=2]
|
||||
|
||||
[ext_resource path="res://Assets/spriteset test.png" type="Texture" id=1]
|
||||
[ext_resource path="res://Scripts/Player.gd" type="Script" id=2]
|
||||
[ext_resource path="res://Assets/zétoile.png" type="Texture" id=3]
|
||||
[ext_resource path="res://Sounds/PaintJamPickupSound.wav" type="AudioStream" id=4]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=1]
|
||||
extents = Vector2( 15.5015, 46.849 )
|
||||
@ -267,3 +268,6 @@ position = Vector2( 0.823479, -2.89215 )
|
||||
rotation = -0.639347
|
||||
scale = Vector2( 1.1136, 1.2906 )
|
||||
texture = ExtResource( 3 )
|
||||
|
||||
[node name="PickupPlayer" type="AudioStreamPlayer2D" parent="."]
|
||||
stream = ExtResource( 4 )
|
||||
|
@ -1,8 +1,9 @@
|
||||
[gd_scene load_steps=4 format=2]
|
||||
[gd_scene load_steps=5 format=2]
|
||||
|
||||
[ext_resource path="res://Assets/titlescreen.png" type="Texture" id=1]
|
||||
[ext_resource path="res://Scripts/TitleScreen.gd" type="Script" id=2]
|
||||
[ext_resource path="res://icon.png" type="Texture" id=3]
|
||||
[ext_resource path="res://Sounds/PaintJamTitleScreen.wav" type="AudioStream" id=4]
|
||||
|
||||
[node name="TitleScreen" type="Node2D"]
|
||||
script = ExtResource( 2 )
|
||||
@ -44,5 +45,9 @@ margin_left = 164.0
|
||||
margin_right = 228.0
|
||||
margin_bottom = 64.0
|
||||
texture_normal = ExtResource( 3 )
|
||||
|
||||
[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="."]
|
||||
stream = ExtResource( 4 )
|
||||
autoplay = true
|
||||
[connection signal="pressed" from="Sprite/MarginContainer/HBoxContainer/StartGameButton" to="." method="_on_StartGameButton_pressed"]
|
||||
[connection signal="pressed" from="Sprite/MarginContainer/HBoxContainer/QuitGameButton" to="." method="_on_QuitGame_pressed"]
|
||||
|
@ -1,6 +1,8 @@
|
||||
extends Control
|
||||
|
||||
func showEndGameWindow(playerName):
|
||||
var audioPlayer = get_parent().get_node("EndGameTheme")
|
||||
audioPlayer.play()
|
||||
get_tree().paused = true
|
||||
self.visible = true
|
||||
get_node("/root/World/CanvasLayer/Window/ColorRect/WinnerName").text = playerName
|
||||
|
@ -28,6 +28,7 @@ var inputs = ["ui_up", "ui_right", "ui_down", "ui_left"]
|
||||
onready var animationPlayer = $AnimationPlayer
|
||||
onready var animationTree = $AnimationTree
|
||||
onready var animationState = animationTree.get("parameters/playback")
|
||||
onready var pickupPlayer = $PickupPlayer
|
||||
var healthBar = null
|
||||
|
||||
func _ready():
|
||||
@ -86,5 +87,6 @@ func updatePaintEffects(delta):
|
||||
coroutines.append(rout)
|
||||
|
||||
func addCoroutine(routine):
|
||||
pickupPlayer.play()
|
||||
curLife = MAX_LIFE if (curLife + PICKUP_BONUS > MAX_LIFE) else curLife + PICKUP_BONUS
|
||||
coroutines.append(routine)
|
||||
|
BIN
Sounds/PaintJamEndGameTheme.wav
Normal file
BIN
Sounds/PaintJamEndGameTheme.wav
Normal file
Binary file not shown.
21
Sounds/PaintJamEndGameTheme.wav.import
Normal file
21
Sounds/PaintJamEndGameTheme.wav.import
Normal file
@ -0,0 +1,21 @@
|
||||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamSample"
|
||||
path="res://.import/PaintJamEndGameTheme.wav-93291435a441dbb79376eeea70896a6c.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Sounds/PaintJamEndGameTheme.wav"
|
||||
dest_files=[ "res://.import/PaintJamEndGameTheme.wav-93291435a441dbb79376eeea70896a6c.sample" ]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop=false
|
||||
compress/mode=0
|
BIN
Sounds/PaintJamMainTheme.wav
Normal file
BIN
Sounds/PaintJamMainTheme.wav
Normal file
Binary file not shown.
21
Sounds/PaintJamMainTheme.wav.import
Normal file
21
Sounds/PaintJamMainTheme.wav.import
Normal file
@ -0,0 +1,21 @@
|
||||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamSample"
|
||||
path="res://.import/PaintJamMainTheme.wav-0df26350225ae9496e0c55b79559d1b5.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Sounds/PaintJamMainTheme.wav"
|
||||
dest_files=[ "res://.import/PaintJamMainTheme.wav-0df26350225ae9496e0c55b79559d1b5.sample" ]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop=false
|
||||
compress/mode=0
|
BIN
Sounds/PaintJamPickupSound.wav
Normal file
BIN
Sounds/PaintJamPickupSound.wav
Normal file
Binary file not shown.
21
Sounds/PaintJamPickupSound.wav.import
Normal file
21
Sounds/PaintJamPickupSound.wav.import
Normal file
@ -0,0 +1,21 @@
|
||||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamSample"
|
||||
path="res://.import/PaintJamPickupSound.wav-b87eb76d400bdbe6d424c7058636baa3.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Sounds/PaintJamPickupSound.wav"
|
||||
dest_files=[ "res://.import/PaintJamPickupSound.wav-b87eb76d400bdbe6d424c7058636baa3.sample" ]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop=false
|
||||
compress/mode=0
|
BIN
Sounds/PaintJamTitleScreen.wav
Normal file
BIN
Sounds/PaintJamTitleScreen.wav
Normal file
Binary file not shown.
21
Sounds/PaintJamTitleScreen.wav.import
Normal file
21
Sounds/PaintJamTitleScreen.wav.import
Normal file
@ -0,0 +1,21 @@
|
||||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamSample"
|
||||
path="res://.import/PaintJamTitleScreen.wav-f7d0e5c78d74637a67b5ea6ca28d87c2.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Sounds/PaintJamTitleScreen.wav"
|
||||
dest_files=[ "res://.import/PaintJamTitleScreen.wav-f7d0e5c78d74637a67b5ea6ca28d87c2.sample" ]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop=false
|
||||
compress/mode=0
|
Loading…
x
Reference in New Issue
Block a user