1
Fork 0
mirror of https://github.com/RYGhub/the-cold-night.git synced 2024-11-21 20:24:20 +00:00

Does sound work?

This commit is contained in:
Cookie-CHR 2022-04-03 15:44:51 +02:00
parent 82daeab48a
commit 2f457d7eb5
5 changed files with 15 additions and 1 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -1,9 +1,10 @@
[gd_scene load_steps=6 format=2]
[gd_scene load_steps=7 format=2]
[ext_resource path="res://src/mechanics/Arrow.png" type="Texture" id=1]
[ext_resource path="res://src/entities/behaviours/BulletMovement.gd" type="Script" id=2]
[ext_resource path="res://src/entities/behaviours/Ownership.tscn" type="PackedScene" id=3]
[ext_resource path="res://src/entities/Bullet.gd" type="Script" id=4]
[ext_resource path="res://src/entities/behaviours/ArrowSound.gd" type="Script" id=5]
[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 16, 8 )
@ -24,4 +25,7 @@ texture = ExtResource( 1 )
script = ExtResource( 2 )
[node name="Ownership" parent="." instance=ExtResource( 3 )]
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
script = ExtResource( 5 )
[connection signal="hit" from="BulletMovement" to="." method="_on_BulletMovement_hit"]

View file

@ -0,0 +1,10 @@
extends AudioStreamPlayer
func _ready():
set_stream(load("res://src/Sounds/arrow.mp3"))
play()
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
# pass