Skip to content
Snippets Groups Projects
Commit 24ea7964 authored by Jannik Rosendahl's avatar Jannik Rosendahl
Browse files

alex shard sounds

parent 692a296c
No related branches found
No related tags found
No related merge requests found
[gd_scene load_steps=45 format=2] [gd_scene load_steps=46 format=2]
[ext_resource path="res://src/actors/player/Player.tscn" type="PackedScene" id=1] [ext_resource path="res://src/actors/player/Player.tscn" type="PackedScene" id=1]
[ext_resource path="res://src/assets/sounds/kristallsound.wav" type="AudioStream" id=2]
[ext_resource path="res://src/assets/tilesets/main_scifi_tileset.png" type="Texture" id=3] [ext_resource path="res://src/assets/tilesets/main_scifi_tileset.png" type="Texture" id=3]
[ext_resource path="res://src/scenes/Door.tscn" type="PackedScene" id=4] [ext_resource path="res://src/scenes/Door.tscn" type="PackedScene" id=4]
[ext_resource path="res://src/scenes/shards.tscn" type="PackedScene" id=5] [ext_resource path="res://src/scenes/shards.tscn" type="PackedScene" id=5]
...@@ -811,7 +812,7 @@ points = PoolVector2Array( 0, 0, 32, 0, 32, 32, 0, 32 ) ...@@ -811,7 +812,7 @@ points = PoolVector2Array( 0, 0, 32, 0, 32, 32, 0, 32 )
23/shapes = [ ] 23/shapes = [ ]
23/z_index = 0 23/z_index = 0
[sub_resource type="StyleBoxFlat" id=29] [sub_resource type="StyleBoxFlat" id=31]
bg_color = Color( 0, 0, 0, 0 ) bg_color = Color( 0, 0, 0, 0 )
corner_radius_top_left = 15 corner_radius_top_left = 15
corner_radius_top_right = 15 corner_radius_top_right = 15
...@@ -1059,6 +1060,9 @@ position = Vector2( 1982, 183 ) ...@@ -1059,6 +1060,9 @@ position = Vector2( 1982, 183 )
[node name="coin2" parent="Level1/Objects/Coins" instance=ExtResource( 7 )] [node name="coin2" parent="Level1/Objects/Coins" instance=ExtResource( 7 )]
position = Vector2( 972.106, 298.929 ) position = Vector2( 972.106, 298.929 )
[node name="shards" parent="Level1/Objects/Coins" instance=ExtResource( 5 )]
position = Vector2( 640, 417 )
[node name="Acid" type="Node" parent="Level1/Objects"] [node name="Acid" type="Node" parent="Level1/Objects"]
[node name="Acid" parent="Level1/Objects/Acid" instance=ExtResource( 6 )] [node name="Acid" parent="Level1/Objects/Acid" instance=ExtResource( 6 )]
...@@ -1197,7 +1201,6 @@ position = Vector2( 11167, 292 ) ...@@ -1197,7 +1201,6 @@ position = Vector2( 11167, 292 )
[node name="Player" parent="Level1" instance=ExtResource( 1 )] [node name="Player" parent="Level1" instance=ExtResource( 1 )]
position = Vector2( 499.46, 426.182 ) position = Vector2( 499.46, 426.182 )
collision_mask = 16 collision_mask = 16
grey_scale = true
[node name="Level" type="TileMap" parent="Level1"] [node name="Level" type="TileMap" parent="Level1"]
tile_set = SubResource( 28 ) tile_set = SubResource( 28 )
...@@ -1215,7 +1218,7 @@ margin_left = 1096.0 ...@@ -1215,7 +1218,7 @@ margin_left = 1096.0
margin_top = 8.0 margin_top = 8.0
margin_right = 1272.0 margin_right = 1272.0
margin_bottom = 72.0 margin_bottom = 72.0
custom_styles/panel = SubResource( 29 ) custom_styles/panel = SubResource( 31 )
__meta__ = { __meta__ = {
"_edit_use_anchors_": false "_edit_use_anchors_": false
} }
...@@ -1249,6 +1252,9 @@ __meta__ = { ...@@ -1249,6 +1252,9 @@ __meta__ = {
stream = ExtResource( 15 ) stream = ExtResource( 15 )
volume_db = -12.0 volume_db = -12.0
[node name="shardSound" type="AudioStreamPlayer" parent="Level1/Score"]
stream = ExtResource( 2 )
[connection signal="coin_collected" from="Level1/Objects/Coins/coin" to="Level1/Score" method="_on_coin_collected"] [connection signal="coin_collected" from="Level1/Objects/Coins/coin" to="Level1/Score" method="_on_coin_collected"]
[connection signal="coin_collected" from="Level1/Objects/Coins/coin3" to="Level1/Score" method="_on_coin_collected"] [connection signal="coin_collected" from="Level1/Objects/Coins/coin3" to="Level1/Score" method="_on_coin_collected"]
[connection signal="coin_collected" from="Level1/Objects/Coins/coin7" to="Level1/Score" method="_on_coin_collected"] [connection signal="coin_collected" from="Level1/Objects/Coins/coin7" to="Level1/Score" method="_on_coin_collected"]
...@@ -1319,3 +1325,4 @@ volume_db = -12.0 ...@@ -1319,3 +1325,4 @@ volume_db = -12.0
[connection signal="coin_collected" from="Level1/Objects/Coins/coin5" to="Level1/Score" method="_on_coin_collected"] [connection signal="coin_collected" from="Level1/Objects/Coins/coin5" to="Level1/Score" method="_on_coin_collected"]
[connection signal="coin_collected" from="Level1/Objects/Coins/coin6" to="Level1/Score" method="_on_coin_collected"] [connection signal="coin_collected" from="Level1/Objects/Coins/coin6" to="Level1/Score" method="_on_coin_collected"]
[connection signal="coin_collected" from="Level1/Objects/Coins/coin2" to="Level1/Score" method="_on_coin_collected"] [connection signal="coin_collected" from="Level1/Objects/Coins/coin2" to="Level1/Score" method="_on_coin_collected"]
[connection signal="shard_collected" from="Level1/Objects/Coins/shards" to="Level1/Score" method="_on_shard_collected"]
[gd_scene load_steps=49 format=2] [gd_scene load_steps=50 format=2]
[ext_resource path="res://src/assets/sounds/kristallsound.wav" type="AudioStream" id=1]
[ext_resource path="res://src/assets/tilesets/main_scifi_tileset.png" type="Texture" id=2] [ext_resource path="res://src/assets/tilesets/main_scifi_tileset.png" type="Texture" id=2]
[ext_resource path="res://src/scenes/PauseController.tscn" type="PackedScene" id=3] [ext_resource path="res://src/scenes/PauseController.tscn" type="PackedScene" id=3]
[ext_resource path="res://src/actors/player/Player.tscn" type="PackedScene" id=4] [ext_resource path="res://src/actors/player/Player.tscn" type="PackedScene" id=4]
...@@ -754,14 +755,14 @@ points = PoolVector2Array( 0, 0, 32, 0, 32, 32, 0, 32 ) ...@@ -754,14 +755,14 @@ points = PoolVector2Array( 0, 0, 32, 0, 32, 32, 0, 32 )
} ] } ]
17/z_index = 0 17/z_index = 0
[sub_resource type="StyleBoxFlat" id=30] [sub_resource type="StyleBoxFlat" id=31]
bg_color = Color( 0, 0, 0, 0 ) bg_color = Color( 0, 0, 0, 0 )
corner_radius_top_left = 15 corner_radius_top_left = 15
corner_radius_top_right = 15 corner_radius_top_right = 15
corner_radius_bottom_right = 15 corner_radius_bottom_right = 15
corner_radius_bottom_left = 15 corner_radius_bottom_left = 15
[sub_resource type="DynamicFont" id=31] [sub_resource type="DynamicFont" id=30]
size = 29 size = 29
font_data = ExtResource( 8 ) font_data = ExtResource( 8 )
...@@ -938,9 +939,8 @@ scale = Vector2( 1.41689, 1.43723 ) ...@@ -938,9 +939,8 @@ scale = Vector2( 1.41689, 1.43723 )
position = Vector2( 2131, 297 ) position = Vector2( 2131, 297 )
[node name="Player" parent="Level0" instance=ExtResource( 4 )] [node name="Player" parent="Level0" instance=ExtResource( 4 )]
position = Vector2( 1880, 385 ) position = Vector2( 528, 422.454 )
collision_mask = 16 collision_mask = 16
grey_scale = true
[node name="Level" type="TileMap" parent="Level0"] [node name="Level" type="TileMap" parent="Level0"]
tile_set = SubResource( 29 ) tile_set = SubResource( 29 )
...@@ -959,7 +959,7 @@ margin_left = 1096.0 ...@@ -959,7 +959,7 @@ margin_left = 1096.0
margin_top = 8.0 margin_top = 8.0
margin_right = 1272.0 margin_right = 1272.0
margin_bottom = 72.0 margin_bottom = 72.0
custom_styles/panel = SubResource( 30 ) custom_styles/panel = SubResource( 31 )
__meta__ = { __meta__ = {
"_edit_use_anchors_": false "_edit_use_anchors_": false
} }
...@@ -982,7 +982,7 @@ margin_top = 24.0 ...@@ -982,7 +982,7 @@ margin_top = 24.0
margin_right = 1264.0 margin_right = 1264.0
margin_bottom = 56.0 margin_bottom = 56.0
custom_colors/font_color = Color( 0.988235, 1, 0.321569, 1 ) custom_colors/font_color = Color( 0.988235, 1, 0.321569, 1 )
custom_fonts/font = SubResource( 31 ) custom_fonts/font = SubResource( 30 )
align = 1 align = 1
valign = 1 valign = 1
__meta__ = { __meta__ = {
...@@ -991,7 +991,11 @@ __meta__ = { ...@@ -991,7 +991,11 @@ __meta__ = {
[node name="coinSound" type="AudioStreamPlayer" parent="Level0/Score"] [node name="coinSound" type="AudioStreamPlayer" parent="Level0/Score"]
stream = ExtResource( 18 ) stream = ExtResource( 18 )
volume_db = 6.058 volume_db = -12.0
[node name="shardSound" type="AudioStreamPlayer" parent="Level0/Score"]
stream = ExtResource( 1 )
[connection signal="coin_collected" from="Level0/Objects/coin" to="Level0/Score" method="_on_coin_collected"] [connection signal="coin_collected" from="Level0/Objects/coin" to="Level0/Score" method="_on_coin_collected"]
[connection signal="coin_collected" from="Level0/Objects/coin2" to="Level0/Score" method="_on_coin_collected"] [connection signal="coin_collected" from="Level0/Objects/coin2" to="Level0/Score" method="_on_coin_collected"]
[connection signal="shard_collected" from="Level0/Objects/shards" to="Level0/Score" method="_on_shard_collected"]
...@@ -9,3 +9,9 @@ func _on_coin_collected(): ...@@ -9,3 +9,9 @@ func _on_coin_collected():
coins = coins + 10 coins = coins + 10
$coinSound.play() $coinSound.play()
_ready() _ready()
func _on_shard_collected():
coins = coins + 50
$shardSound.play()
_ready()
extends Area2D extends Area2D
signal shard_collected
func _on_shards_body_entered(body): func _on_shards_body_entered(body):
queue_free() queue_free()
emit_signal("shard_collected")
...@@ -66,7 +66,8 @@ position = Vector2( 9.53674e-07, -4.76837e-07 ) ...@@ -66,7 +66,8 @@ position = Vector2( 9.53674e-07, -4.76837e-07 )
scale = Vector2( 1.79688, 1.28125 ) scale = Vector2( 1.79688, 1.28125 )
frames = SubResource( 10 ) frames = SubResource( 10 )
animation = "spin" animation = "spin"
frame = 6 frame = 5
playing = true playing = true
[connection signal="body_entered" from="." to="." method="_on_shards_body_entered"] [connection signal="body_entered" from="." to="." method="_on_shards_body_entered"]
[connection signal="shard_collected" from="." to="." method="_on_shard_collected"]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment