Merge pull request 'develop' (#38) from develop into master
Reviewed-on: #38
This commit is contained in:
commit
e972ed4c99
@ -52,3 +52,4 @@ collision_mask = 24
|
||||
|
||||
[node name="Jump" type="AudioStreamPlayer" parent="Sounds"]
|
||||
stream = ExtResource( 8 )
|
||||
volume_db = -45.0
|
||||
|
@ -45,4 +45,5 @@ script = ExtResource( 1 )
|
||||
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
|
||||
pause_mode = 2
|
||||
stream = ExtResource( 5 )
|
||||
volume_db = -35.0
|
||||
script = ExtResource( 6 )
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
#include "Event.h"
|
||||
|
||||
#include <AudioStreamPlayer.hpp>
|
||||
#include <Camera2D.hpp>
|
||||
#include <KinematicCollision2D.hpp>
|
||||
#include <RayCast2D.hpp>
|
||||
@ -129,6 +130,8 @@ void alai::player::Player::_physics_process(float delta)
|
||||
WARN_PRINT("Enemies not found!");
|
||||
dup->queue_free();
|
||||
}*/
|
||||
auto jump_sound = get_parent()->get_node<godot::AudioStreamPlayer>("Sounds/Jump");
|
||||
jump_sound->play();
|
||||
velocity.y = -get_bounce_force();
|
||||
}
|
||||
else if (collider->is_in_group("enemy") && (collider->is_in_group("rideable") && godot::Vector2::DOWN.dot(collision->get_normal()) > 0))
|
||||
|
Loading…
Reference in New Issue
Block a user