mirror of
https://github.com/Steffo99/hella-farm.git
synced 2024-11-27 18:44:23 +00:00
Make gold play a sound on pickup
This commit is contained in:
parent
cc93ff7b90
commit
058a2a6ac9
14 changed files with 55 additions and 108 deletions
|
@ -21,3 +21,4 @@ This project uses the following external assets:
|
|||
| `./temp/squelch.wav` | https://freesound.org/people/primeval_polypod/sounds/159389/ | Attribution 3 |
|
||||
| `./temp/arcade_cancel.flac` | https://freesound.org/people/plasterbrain/sounds/464912/ | CC0 |
|
||||
| `./temp/cancel.wav` | https://freesound.org/people/Kagateni/sounds/571510/ | CC0 |
|
||||
| `./entities/coin.ogg` | https://freesound.org/people/forrisday/sounds/214509/ | Attribution 4 |
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
extends Node2D
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta: float) -> void:
|
||||
pass
|
||||
|
||||
|
||||
func _on_tree_exiting() -> void:
|
||||
pass # Replace with function body.
|
|
@ -1,8 +0,0 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://dv7ea2y0l46e"]
|
||||
|
||||
[ext_resource type="Script" path="res://behaviours/drop_on_free.gd" id="1_4xihn"]
|
||||
|
||||
[node name="DropOnFree" type="Node2D"]
|
||||
script = ExtResource("1_4xihn")
|
||||
|
||||
[connection signal="tree_exiting" from="." to="." method="_on_tree_exiting"]
|
8
behaviours/spawner_free.tscn
Normal file
8
behaviours/spawner_free.tscn
Normal file
|
@ -0,0 +1,8 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://dv7ea2y0l46e"]
|
||||
|
||||
[ext_resource type="Script" path="res://behaviours/spawner.gd" id="1_fa574"]
|
||||
|
||||
[node name="SpawnerFree" type="Node2D"]
|
||||
script = ExtResource("1_fa574")
|
||||
|
||||
[connection signal="tree_exiting" from="." to="." method="spawn"]
|
|
@ -3,15 +3,15 @@
|
|||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bfl0tkg85cvb8"
|
||||
path="res://.godot/imported/pickup_coin.png-24cd85ffeb9f86568a86b5533e35ebe6.ctex"
|
||||
path="res://.godot/imported/gold.png-2490a66f83b8860580858fb1907ff558.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://temp/pickup_coin.png"
|
||||
dest_files=["res://.godot/imported/pickup_coin.png-24cd85ffeb9f86568a86b5533e35ebe6.ctex"]
|
||||
source_file="res://entities/gold.png"
|
||||
dest_files=["res://.godot/imported/gold.png-2490a66f83b8860580858fb1907ff558.ctex"]
|
||||
|
||||
[params]
|
||||
|
|
@ -1,25 +1,29 @@
|
|||
[gd_scene load_steps=5 format=3 uid="uid://uoxwjpmgg27a"]
|
||||
[gd_scene load_steps=7 format=3 uid="uid://uoxwjpmgg27a"]
|
||||
|
||||
[ext_resource type="Script" path="res://entities/gold.gd" id="1_lbls1"]
|
||||
[ext_resource type="PackedScene" uid="uid://bvrxvrjlo5130" path="res://behaviours/move_towards_mouse.tscn" id="2_lso1v"]
|
||||
[ext_resource type="Texture2D" uid="uid://bfl0tkg85cvb8" path="res://entities/gold.png" id="2_tt3v6"]
|
||||
[ext_resource type="PackedScene" uid="uid://dj72yshd25ucx" path="res://behaviours/collectable.tscn" id="3_q0bno"]
|
||||
|
||||
[sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_1f58t"]
|
||||
[ext_resource type="PackedScene" uid="uid://dv7ea2y0l46e" path="res://behaviours/spawner_free.tscn" id="5_pbaso"]
|
||||
[ext_resource type="PackedScene" uid="uid://eqg6snsgn1kh" path="res://players/gold_pickup_player.tscn" id="6_eoeje"]
|
||||
|
||||
[node name="Gold" type="Node2D"]
|
||||
script = ExtResource("1_lbls1")
|
||||
|
||||
[node name="Sprite" type="Sprite2D" parent="."]
|
||||
scale = Vector2(12, 12)
|
||||
texture = SubResource("PlaceholderTexture2D_1f58t")
|
||||
scale = Vector2(2, 2)
|
||||
texture = ExtResource("2_tt3v6")
|
||||
|
||||
[node name="MoveTowardsMouse" parent="." instance=ExtResource("2_lso1v")]
|
||||
scale = Vector2(5, 5)
|
||||
speed = 333.0
|
||||
scale = Vector2(8, 8)
|
||||
speed = 555.0
|
||||
|
||||
[node name="Collectable" parent="." instance=ExtResource("3_q0bno")]
|
||||
scale = Vector2(0.87, 0.87)
|
||||
scale = Vector2(0.6, 0.6)
|
||||
tag = &"Gold"
|
||||
|
||||
[node name="SpawnerFree" parent="." instance=ExtResource("5_pbaso")]
|
||||
scene = ExtResource("6_eoeje")
|
||||
|
||||
[connection signal="move" from="MoveTowardsMouse" to="." method="_on_move"]
|
||||
[connection signal="collected" from="Collectable" to="." method="_on_collected"]
|
||||
|
|
BIN
players/gold_pickup.ogg
(Stored with Git LFS)
Normal file
BIN
players/gold_pickup.ogg
(Stored with Git LFS)
Normal file
Binary file not shown.
19
players/gold_pickup.ogg.import
Normal file
19
players/gold_pickup.ogg.import
Normal file
|
@ -0,0 +1,19 @@
|
|||
[remap]
|
||||
|
||||
importer="oggvorbisstr"
|
||||
type="AudioStreamOggVorbis"
|
||||
uid="uid://cogtamt27rox2"
|
||||
path="res://.godot/imported/gold_pickup.ogg-c4d9dcf906cf090ebcf2a027cf53c3b5.oggvorbisstr"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://players/gold_pickup.ogg"
|
||||
dest_files=["res://.godot/imported/gold_pickup.ogg-c4d9dcf906cf090ebcf2a027cf53c3b5.oggvorbisstr"]
|
||||
|
||||
[params]
|
||||
|
||||
loop=false
|
||||
loop_offset=0
|
||||
bpm=0
|
||||
beat_count=0
|
||||
bar_beats=4
|
9
players/gold_pickup_player.tscn
Normal file
9
players/gold_pickup_player.tscn
Normal file
|
@ -0,0 +1,9 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://eqg6snsgn1kh"]
|
||||
|
||||
[ext_resource type="AudioStream" uid="uid://cogtamt27rox2" path="res://players/gold_pickup.ogg" id="1_rpx7k"]
|
||||
|
||||
[node name="GoldPickupPlayer" type="AudioStreamPlayer2D"]
|
||||
stream = ExtResource("1_rpx7k")
|
||||
autoplay = true
|
||||
|
||||
[connection signal="finished" from="." to="." method="queue_free"]
|
BIN
temp/monster_imp_onground_left.png
(Stored with Git LFS)
BIN
temp/monster_imp_onground_left.png
(Stored with Git LFS)
Binary file not shown.
|
@ -1,34 +0,0 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://crhwsob76ieya"
|
||||
path="res://.godot/imported/monster_imp_onground_left.png-4d586617808a7c4d0d75fc58328060ab.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://temp/monster_imp_onground_left.png"
|
||||
dest_files=["res://.godot/imported/monster_imp_onground_left.png-4d586617808a7c4d0d75fc58328060ab.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
BIN
temp/monster_imp_onground_right.png
(Stored with Git LFS)
BIN
temp/monster_imp_onground_right.png
(Stored with Git LFS)
Binary file not shown.
|
@ -1,34 +0,0 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bubehid53q8h1"
|
||||
path="res://.godot/imported/monster_imp_onground_right.png-6be56e3ee4743289f963f848fbdf8e49.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://temp/monster_imp_onground_right.png"
|
||||
dest_files=["res://.godot/imported/monster_imp_onground_right.png-6be56e3ee4743289f963f848fbdf8e49.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
Loading…
Reference in a new issue