add sounds and adjust music #22
BIN
godot/assets/music/level2.ogg
(Stored with Git LFS)
BIN
godot/assets/music/level2.ogg
(Stored with Git LFS)
Binary file not shown.
BIN
godot/assets/sounds/coin.wav
(Stored with Git LFS)
Normal file
BIN
godot/assets/sounds/coin.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
23
godot/assets/sounds/coin.wav.import
Normal file
23
godot/assets/sounds/coin.wav.import
Normal file
@ -0,0 +1,23 @@
|
||||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamSample"
|
||||
path="res://.import/coin.wav-9081ee1c6d81d9c34d08bc916297b892.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sounds/coin.wav"
|
||||
dest_files=[ "res://.import/coin.wav-9081ee1c6d81d9c34d08bc916297b892.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_mode=0
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=0
|
BIN
godot/assets/sounds/died.wav
(Stored with Git LFS)
Normal file
BIN
godot/assets/sounds/died.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
23
godot/assets/sounds/died.wav.import
Normal file
23
godot/assets/sounds/died.wav.import
Normal file
@ -0,0 +1,23 @@
|
||||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamSample"
|
||||
path="res://.import/died.wav-fc4528ad616bbce5115ae092cb80d346.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sounds/died.wav"
|
||||
dest_files=[ "res://.import/died.wav-fc4528ad616bbce5115ae092cb80d346.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_mode=0
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=0
|
BIN
godot/assets/sounds/gem.wav
(Stored with Git LFS)
Normal file
BIN
godot/assets/sounds/gem.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
23
godot/assets/sounds/gem.wav.import
Normal file
23
godot/assets/sounds/gem.wav.import
Normal file
@ -0,0 +1,23 @@
|
||||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamSample"
|
||||
path="res://.import/gem.wav-49535e5638777427fa416449f386aaf6.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sounds/gem.wav"
|
||||
dest_files=[ "res://.import/gem.wav-49535e5638777427fa416449f386aaf6.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_mode=0
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=0
|
BIN
godot/assets/sounds/jump.wav
(Stored with Git LFS)
Normal file
BIN
godot/assets/sounds/jump.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
23
godot/assets/sounds/jump.wav.import
Normal file
23
godot/assets/sounds/jump.wav.import
Normal file
@ -0,0 +1,23 @@
|
||||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamSample"
|
||||
path="res://.import/jump.wav-395b727cde98999423d5c020c9c3492f.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sounds/jump.wav"
|
||||
dest_files=[ "res://.import/jump.wav-395b727cde98999423d5c020c9c3492f.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_mode=0
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=0
|
BIN
godot/assets/sounds/ui_popup.wav
(Stored with Git LFS)
Normal file
BIN
godot/assets/sounds/ui_popup.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
23
godot/assets/sounds/ui_popup.wav.import
Normal file
23
godot/assets/sounds/ui_popup.wav.import
Normal file
@ -0,0 +1,23 @@
|
||||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamSample"
|
||||
path="res://.import/ui_popup.wav-b70bc280bf50aa4e775c08111118c3ae.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sounds/ui_popup.wav"
|
||||
dest_files=[ "res://.import/ui_popup.wav-b70bc280bf50aa4e775c08111118c3ae.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_mode=0
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=0
|
BIN
godot/assets/sounds/ui_select.wav
(Stored with Git LFS)
Normal file
BIN
godot/assets/sounds/ui_select.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
23
godot/assets/sounds/ui_select.wav.import
Normal file
23
godot/assets/sounds/ui_select.wav.import
Normal file
@ -0,0 +1,23 @@
|
||||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamSample"
|
||||
path="res://.import/ui_select.wav-a1e6656879b8474ab79f3a15e3073001.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sounds/ui_select.wav"
|
||||
dest_files=[ "res://.import/ui_select.wav-a1e6656879b8474ab79f3a15e3073001.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_mode=0
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=0
|
@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=9 format=2]
|
||||
[gd_scene load_steps=10 format=2]
|
||||
|
||||
[ext_resource path="res://characters/player/sprites/green.tres" type="SpriteFrames" id=1]
|
||||
[ext_resource path="res://characters/player/states/Idle.gdns" type="Script" id=2]
|
||||
@ -7,6 +7,7 @@
|
||||
[ext_resource path="res://characters/player/Player.gdns" type="Script" id=5]
|
||||
[ext_resource path="res://characters/player/states/Jump.gdns" type="Script" id=6]
|
||||
[ext_resource path="res://characters/player/states/Fall.gdns" type="Script" id=7]
|
||||
[ext_resource path="res://assets/sounds/jump.wav" type="AudioStream" id=8]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=1]
|
||||
extents = Vector2( 7, 12 )
|
||||
@ -40,3 +41,8 @@ script = ExtResource( 6 )
|
||||
|
||||
[node name="Fall" type="Node" parent="StateMachine"]
|
||||
script = ExtResource( 7 )
|
||||
|
||||
[node name="Sounds" type="Node" parent="."]
|
||||
|
||||
[node name="Jump" type="AudioStreamPlayer" parent="Sounds"]
|
||||
stream = ExtResource( 8 )
|
||||
|
@ -1,9 +1,12 @@
|
||||
[gd_scene load_steps=14 format=2]
|
||||
[gd_scene load_steps=17 format=2]
|
||||
|
||||
[ext_resource path="res://assets/fonts/data/PixelOperator.tres" type="DynamicFontData" id=1]
|
||||
[ext_resource path="res://assets/fonts/data/PixelOperator-Bold.tres" type="DynamicFontData" id=2]
|
||||
[ext_resource path="res://monitor/Rut.gd" type="Script" id=3]
|
||||
[ext_resource path="res://monitor/UISounds.gd" type="Script" id=4]
|
||||
[ext_resource path="res://monitor/EnterButton.gd" type="Script" id=5]
|
||||
[ext_resource path="res://assets/sounds/ui_popup.wav" type="AudioStream" id=6]
|
||||
[ext_resource path="res://assets/sounds/ui_select.wav" type="AudioStream" id=7]
|
||||
|
||||
[sub_resource type="DynamicFont" id=1]
|
||||
font_data = ExtResource( 1 )
|
||||
@ -77,6 +80,15 @@ anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
rect_min_size = Vector2( 512, 0 )
|
||||
|
||||
[node name="Sounds" type="Node" parent="GUI"]
|
||||
script = ExtResource( 4 )
|
||||
|
||||
[node name="Popup" type="AudioStreamPlayer" parent="GUI/Sounds"]
|
||||
stream = ExtResource( 6 )
|
||||
|
||||
[node name="Menu" type="AudioStreamPlayer" parent="GUI/Sounds"]
|
||||
stream = ExtResource( 7 )
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="GUI"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
@ -221,6 +233,11 @@ align = 1
|
||||
valign = 1
|
||||
autowrap = true
|
||||
|
||||
[connection signal="focus_entered" from="GUI/VBoxContainer/CenterContainer2/VBoxContainer2/Name" to="GUI/Sounds" method="_play_ui_select_sound"]
|
||||
[connection signal="focus_entered" from="GUI/VBoxContainer/CenterContainer2/VBoxContainer2/Rut" to="GUI/Sounds" method="_play_ui_select_sound"]
|
||||
[connection signal="text_changed" from="GUI/VBoxContainer/CenterContainer2/VBoxContainer2/Rut" to="GUI/VBoxContainer/CenterContainer2/VBoxContainer2/Rut" method="_on_Rut_text_changed"]
|
||||
[connection signal="focus_entered" from="GUI/VBoxContainer/CenterContainer2/VBoxContainer2/Email" to="GUI/Sounds" method="_play_ui_select_sound"]
|
||||
[connection signal="focus_entered" from="GUI/VBoxContainer/CenterContainer3/Button" to="GUI/Sounds" method="_play_ui_select_sound"]
|
||||
[connection signal="pressed" from="GUI/VBoxContainer/CenterContainer3/Button" to="GUI/VBoxContainer/CenterContainer3/Button" method="_on_Button_pressed"]
|
||||
[connection signal="focus_entered" from="PopupDialog" to="GUI/Sounds" method="_play_popup_sound"]
|
||||
[connection signal="gui_input" from="PopupDialog" to="GUI/VBoxContainer/CenterContainer3/Button" method="_on_PopupDialog_gui_input"]
|
||||
|
9
godot/monitor/UISounds.gd
Normal file
9
godot/monitor/UISounds.gd
Normal file
@ -0,0 +1,9 @@
|
||||
extends Node
|
||||
|
||||
|
||||
func _play_popup_sound() -> void:
|
||||
$Popup.play()
|
||||
|
||||
|
||||
func _play_ui_select_sound() -> void:
|
||||
$Menu.play()
|
@ -1,6 +1,8 @@
|
||||
#include "player/states/PlayerJump.h"
|
||||
#include "player/Player.h"
|
||||
|
||||
#include <AudioStreamPlayer.hpp>
|
||||
|
||||
using namespace godot;
|
||||
using namespace player;
|
||||
|
||||
@ -26,6 +28,9 @@ void PlayerJump::_init()
|
||||
|
||||
void PlayerJump::_state_enter(const String state)
|
||||
{
|
||||
auto jump_sound = get_parent()->get_node<AudioStreamPlayer>("Sounds/Jump");
|
||||
jump_sound->play();
|
||||
|
||||
animated_sprite = get_parent()->get_node<AnimatedSprite>("AnimatedSprite");
|
||||
animated_sprite->stop();
|
||||
animated_sprite->set_animation("air");
|
||||
|
Loading…
Reference in New Issue
Block a user