it just werks
This commit is contained in:
parent
1311e18f1f
commit
7e26433676
50 changed files with 1181 additions and 11 deletions
|
@ -19,4 +19,5 @@ func _on_area_2d_body_entered(body: Node2D) -> void:
|
|||
else:
|
||||
body.velocity.y = (body.jump_force * 1.5) * sign(-body.velocity.y)
|
||||
body.velocity.x += body.graphics.scale.x * 20.0
|
||||
%AudioStreamPlayer.play()
|
||||
%AnimationPlayer.play("bounce")
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
[gd_scene load_steps=7 format=3 uid="uid://68lav5rke5ag"]
|
||||
[gd_scene load_steps=8 format=3 uid="uid://68lav5rke5ag"]
|
||||
|
||||
[ext_resource type="Script" path="res://objects/spring/spring.gd" id="1_05bif"]
|
||||
[ext_resource type="Texture2D" uid="uid://bobpl8pwm216q" path="res://assets/textures/spring/spring.png" id="1_s1olr"]
|
||||
[ext_resource type="AudioStream" uid="uid://b8q3dww80nicd" path="res://assets/audio/sfx/jump.wav" id="3_wq8v8"]
|
||||
|
||||
[sub_resource type="Animation" id="Animation_pa4d8"]
|
||||
length = 0.001
|
||||
|
@ -64,5 +65,11 @@ collision_mask = 16
|
|||
position = Vector2(0, -5.5)
|
||||
shape = SubResource("RectangleShape2D_c7407")
|
||||
|
||||
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
|
||||
unique_name_in_owner = true
|
||||
stream = ExtResource("3_wq8v8")
|
||||
volume_db = -14.0
|
||||
bus = &"Capri"
|
||||
|
||||
[connection signal="area_entered" from="Area2D" to="." method="_on_area_2d_area_entered"]
|
||||
[connection signal="body_entered" from="Area2D" to="." method="_on_area_2d_body_entered"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue