Merge branch 'develop' into feature/enemies

# Conflicts:
#	godot/characters/player/Player.tscn
This commit is contained in:
Chris Cromer 2022-07-27 00:08:25 -04:00
commit f8f1210e61
Signed by: cromer
GPG Key ID: FA91071797BEEEC2
17 changed files with 198 additions and 5 deletions

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

Binary file not shown.

View 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

Binary file not shown.

View 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

Binary file not shown.

View 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

Binary file not shown.

View 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

Binary file not shown.

View 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

Binary file not shown.

View 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

View File

@ -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 )
@ -22,7 +23,7 @@ centered = false
flip_h = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2( 12.5, 12.5 )
position = Vector2( 12, 12 )
shape = SubResource( 1 )
[node name="StateMachine" type="Node" parent="."]
@ -46,3 +47,8 @@ position = Vector2( 12, 0 )
enabled = true
cast_to = Vector2( 0, 32 )
collision_mask = 24
[node name="Sounds" type="Node" parent="."]
[node name="Jump" type="AudioStreamPlayer" parent="Sounds"]
stream = ExtResource( 8 )

View File

@ -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"]

View File

@ -0,0 +1,9 @@
extends Node
func _play_popup_sound() -> void:
$Popup.play()
func _play_ui_select_sound() -> void:
$Menu.play()

View File

@ -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");