Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

Commit

Permalink
Submission
Browse files Browse the repository at this point in the history
  • Loading branch information
gr3yknigh1 committed Oct 4, 2021
1 parent de80989 commit 5b30d8b
Show file tree
Hide file tree
Showing 15 changed files with 208 additions and 9 deletions.
Binary file not shown.
21 changes: 21 additions & 0 deletions nuclear-beer-factory/assets/sounds/bag in beer.wav.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[remap]

importer="wav"
type="AudioStreamSample"
path="res://.import/bag in beer.wav-a02435810dd00cd1464e3393513320b1.sample"

[deps]

source_file="res://assets/sounds/bag in beer.wav"
dest_files=[ "res://.import/bag in beer.wav-a02435810dd00cd1464e3393513320b1.sample" ]

[params]

force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop=false
compress/mode=0
Binary file added nuclear-beer-factory/assets/sounds/bottle.wav
Binary file not shown.
21 changes: 21 additions & 0 deletions nuclear-beer-factory/assets/sounds/bottle.wav.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[remap]

importer="wav"
type="AudioStreamSample"
path="res://.import/bottle.wav-a8d10eef2f6c2c2e4b406d185cbac418.sample"

[deps]

source_file="res://assets/sounds/bottle.wav"
dest_files=[ "res://.import/bottle.wav-a8d10eef2f6c2c2e4b406d185cbac418.sample" ]

[params]

force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop=false
compress/mode=0
Binary file added nuclear-beer-factory/assets/sounds/buy.wav
Binary file not shown.
21 changes: 21 additions & 0 deletions nuclear-beer-factory/assets/sounds/buy.wav.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[remap]

importer="wav"
type="AudioStreamSample"
path="res://.import/buy.wav-d85088e3cfe0469fcd6f21fd63cb4363.sample"

[deps]

source_file="res://assets/sounds/buy.wav"
dest_files=[ "res://.import/buy.wav-d85088e3cfe0469fcd6f21fd63cb4363.sample" ]

[params]

force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop=false
compress/mode=0
Binary file added nuclear-beer-factory/assets/sounds/explosion.wav
Binary file not shown.
21 changes: 21 additions & 0 deletions nuclear-beer-factory/assets/sounds/explosion.wav.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[remap]

importer="wav"
type="AudioStreamSample"
path="res://.import/explosion.wav-52e05e8d4b6600106c8dde082c90f915.sample"

[deps]

source_file="res://assets/sounds/explosion.wav"
dest_files=[ "res://.import/explosion.wav-52e05e8d4b6600106c8dde082c90f915.sample" ]

[params]

force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop=false
compress/mode=0
Binary file added nuclear-beer-factory/assets/sounds/launch.wav
Binary file not shown.
21 changes: 21 additions & 0 deletions nuclear-beer-factory/assets/sounds/launch.wav.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[remap]

importer="wav"
type="AudioStreamSample"
path="res://.import/launch.wav-c908c577211147614ca9332d2d07d135.sample"

[deps]

source_file="res://assets/sounds/launch.wav"
dest_files=[ "res://.import/launch.wav-c908c577211147614ca9332d2d07d135.sample" ]

[params]

force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop=false
compress/mode=0
1 change: 1 addition & 0 deletions nuclear-beer-factory/prefabs/Physics Bodies/Eatable.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ extents = Vector2( 16, 16 )
script = ExtResource( 2 )

[node name="Sprite" parent="." index="0"]
scale = Vector2( 0.900001, 0.900001 )
texture = SubResource( 2 )

[node name="CollisionShape2D" parent="." index="1"]
Expand Down
50 changes: 42 additions & 8 deletions nuclear-beer-factory/scenes/Gameplay.tscn
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[gd_scene load_steps=78 format=2]
[gd_scene load_steps=84 format=2]

[ext_resource path="res://assets/sprites/environment/fueltank/bake-fire.png" type="Texture" id=1]
[ext_resource path="res://assets/sprites/environment/rooms/basement-bg.png" type="Texture" id=2]
Expand Down Expand Up @@ -39,6 +39,12 @@
[ext_resource path="res://scripts/SpaceRocket.gd" type="Script" id=37]
[ext_resource path="res://assets/sprites/gui/buttons.png" type="Texture" id=38]
[ext_resource path="res://assets/fonts/master-font.tres" type="DynamicFont" id=39]
[ext_resource path="res://scenes/SFX AudioStreamPlayer.gd" type="Script" id=40]
[ext_resource path="res://assets/sounds/buy.wav" type="AudioStream" id=41]
[ext_resource path="res://assets/sounds/explosion.wav" type="AudioStream" id=42]
[ext_resource path="res://assets/sounds/bag in beer.wav" type="AudioStream" id=43]
[ext_resource path="res://assets/sounds/bottle.wav" type="AudioStream" id=44]
[ext_resource path="res://assets/sounds/launch.wav" type="AudioStream" id=45]

[sub_resource type="AtlasTexture" id=1]
atlas = ExtResource( 23 )
Expand Down Expand Up @@ -258,6 +264,20 @@ tracks/2/keys = {
"update": 0,
"values": [ Vector2( 853.071, 664.497 ), Vector2( 0, 0 ) ]
}
tracks/3/type = "method"
tracks/3/path = NodePath("../../../../SFX AudioStreamPlayer")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/keys = {
"times": PoolRealArray( 0.1 ),
"transitions": PoolRealArray( 1 ),
"values": [ {
"args": [ ],
"method": "play_explode"
} ]
}

[node name="Gameplay" type="Node2D"]
script = ExtResource( 14 )
Expand Down Expand Up @@ -292,8 +312,18 @@ position = Vector2( -193.841, 353.194 )
[node name="SankSpawner" type="Node2D" parent="."]
position = Vector2( -231.895, -33.2978 )

[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
[node name="Music AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 4 )
volume_db = -23.94
autoplay = true

[node name="SFX AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
script = ExtResource( 40 )
explode_sound = ExtResource( 42 )
buy_sound = ExtResource( 41 )
bottle_sound = ExtResource( 44 )
launch_sound = ExtResource( 45 )
bag_in_beer_sound = ExtResource( 43 )

[node name="BG" type="Node2D" parent="."]

Expand Down Expand Up @@ -368,7 +398,7 @@ texture = ExtResource( 10 )

[node name="FuelTank Fire" type="AnimatedSprite" parent="Props/FuelTank"]
frames = SubResource( 11 )
frame = 5
frame = 1
playing = true

[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Props/FuelTank"]
Expand Down Expand Up @@ -429,7 +459,7 @@ _speed = 30.0
[node name="AnimatedSprite" type="AnimatedSprite" parent="StaticColliders/Conveyor"]
position = Vector2( -33.892, -4.84665 )
frames = SubResource( 22 )
frame = 5
frame = 2
playing = true

[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticColliders/Conveyor"]
Expand Down Expand Up @@ -685,10 +715,10 @@ layer = 2
[node name="WhiteExplode" type="ColorRect" parent="CanvasLayer/GUI/CanvasLayer"]
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = 853.071
margin_top = 664.497
margin_right = 853.071
margin_bottom = 664.498
margin_left = 568.714
margin_top = 442.998
margin_right = 568.714
margin_bottom = 442.998
color = Color( 1, 1, 1, 0 )
__meta__ = {
"_edit_use_anchors_": false
Expand All @@ -697,17 +727,21 @@ __meta__ = {
[node name="ExplotionAnimationPlayer" type="AnimationPlayer" parent="CanvasLayer/GUI/CanvasLayer/WhiteExplode"]
anims/Explode = SubResource( 38 )

[connection signal="stat_changed" from="StatController" to="SFX AudioStreamPlayer" method="_on_StatController_stat_changed"]
[connection signal="stat_changed" from="StatController" to="CanvasLayer/GUI/TabMenu/Pipe/Pipe-Arrow" method="_on_StatController_stat_changed"]
[connection signal="stat_changed" from="StatController" to="CanvasLayer/GUI/TabMenu/Stats/EnergyCount" method="_on_StatController_stat_changed"]
[connection signal="stat_changed" from="StatController" to="CanvasLayer/GUI/TabMenu/Stats/MoneyCount" method="_on_StatController_stat_changed"]
[connection signal="timeout" from="StatController/EnergySpendTimer" to="StatController" method="_on_EnergySpendTimer_timeout"]
[connection signal="timeout" from="StatController/FuelEffectTimer" to="StatController" method="_on_FuelEffectTimer_timeout"]
[connection signal="earned_money" from="Props/SpaceRocket" to="StatController" method="_on_SpaceRocket_earned_money"]
[connection signal="earned_money" from="Props/SpaceRocket" to="SFX AudioStreamPlayer" method="_on_SpaceRocket_earned_money"]
[connection signal="body_entered" from="Props/SpaceRocket/SpaceRocketEater" to="Props/SpaceRocket/SpaceRocketEater" method="_on_Eater_body_entered"]
[connection signal="eated" from="Props/SpaceRocket/SpaceRocketEater" to="StatController" method="_on_SpaceRocketEater_eated"]
[connection signal="eated" from="Props/SpaceRocket/SpaceRocketEater" to="Props/SpaceRocket" method="_on_SpaceRocketEater_eated"]
[connection signal="finished_poped_beer" from="Props/Silo" to="StatController" method="_on_Silo_finished_poped_beer"]
[connection signal="poped_beer" from="Props/Silo" to="StatController" method="_on_Silo_poped_beer"]
[connection signal="poped_beer" from="Props/Silo" to="SFX AudioStreamPlayer" method="_on_Silo_poped_beer"]
[connection signal="poped_beer_aaa" from="Props/Silo" to="SFX AudioStreamPlayer" method="_on_Silo_poped_beer_aaa"]
[connection signal="body_entered" from="Props/Silo/SiloEater" to="Props/Silo/SiloEater" method="_on_Eater_body_entered"]
[connection signal="eated" from="Props/Silo/SiloEater" to="Props/Silo" method="_on_SiloEater_eated"]
[connection signal="timeout" from="Props/Silo/SiloTimer" to="Props/Silo" method="_on_SiloTimer_timeout"]
Expand Down
57 changes: 57 additions & 0 deletions nuclear-beer-factory/scenes/SFX AudioStreamPlayer.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
extends AudioStreamPlayer

export(Resource) var explode_sound
export(Resource) var buy_sound
export(Resource) var bottle_sound
export(Resource) var launch_sound
export(Resource) var bag_in_beer_sound



func play_explode():
if !is_playing():
stream = explode_sound
play()


func play_buy():
if !is_playing():
stream = buy_sound
play()


func play_bottle():
if !is_playing():
stream = bottle_sound
play()


func play_launch():
if !is_playing():
stream = launch_sound
play()


func play_bag_in_beer():
if !is_playing():
stream = bag_in_beer_sound
play()


# I will die in hell for this code ^^^


func _on_SpaceRocket_earned_money(bottle_amount):
play_launch()


func _on_StatController_stat_changed(stat_idx, new_val):
if stat_idx == 1:
play_buy()


func _on_Silo_poped_beer():
play_bag_in_beer()

func _on_Silo_poped_beer_aaa():
play_bottle()
2 changes: 1 addition & 1 deletion nuclear-beer-factory/scripts/Common/Values.gd
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ const V_FUEL_PRICE = 1 #
const V_SANK_PRICE = 1 #

# Cargo
const V_ROCKET_CAP = 8
const V_ROCKET_CAP = 7
2 changes: 2 additions & 0 deletions nuclear-beer-factory/scripts/Silo.gd
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ extends StaticBody2D


signal poped_beer()
signal poped_beer_aaa()
signal finished_poped_beer()

export(Array) var _beers = []
Expand All @@ -19,6 +20,7 @@ func _pop_beer() -> void:
var new_beer: Node2D = _beers[4].instance()
new_beer.global_position = beer_spawn_node.global_position
bottles.add_child(new_beer)
emit_signal("poped_beer_aaa")


func _on_SiloEater_eated(eatable_type):
Expand Down

0 comments on commit 5b30d8b

Please sign in to comment.