basic sound effects are in
This commit is contained in:
parent
d48ac7b9fd
commit
08d7506174
10 changed files with 93 additions and 4 deletions
|
|
@ -20,6 +20,8 @@ enum Mode{
|
|||
@export var static_channel_cover : TextureRect
|
||||
@export var game_viewport : SubViewport
|
||||
@export var result_cover : TextureRect
|
||||
@export var win_player : AudioStreamPlayer
|
||||
@export var lose_player : AudioStreamPlayer
|
||||
|
||||
var channel_mode : Mode = Mode.Offline
|
||||
var result_realness : float = 0
|
||||
|
|
@ -64,10 +66,12 @@ func win_channel():
|
|||
GameManager.channel_win.emit()
|
||||
result_cover.texture = win_result_tex
|
||||
result_realness = 2
|
||||
win_player.play()
|
||||
end_channel()
|
||||
|
||||
func lose_channel():
|
||||
GameManager.channel_lose.emit()
|
||||
result_cover.texture = lose_result_tex
|
||||
result_realness = 2
|
||||
lose_player.play()
|
||||
end_channel()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=12 format=3 uid="uid://63rik2noj8id"]
|
||||
[gd_scene load_steps=14 format=3 uid="uid://63rik2noj8id"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://h43mmpjmmir4" path="res://base modules/channel_controller.gd" id="1_r07ln"]
|
||||
[ext_resource type="Texture2D" uid="uid://cyo0wl4dt3td1" path="res://sprites/offline_channel.png" id="2_01b3p"]
|
||||
|
|
@ -9,6 +9,8 @@
|
|||
[ext_resource type="Texture2D" uid="uid://b2x8kmjcv1te" path="res://sprites/static/Television_static.gif_frame_00003.jpg" id="6_2hkew"]
|
||||
[ext_resource type="Texture2D" uid="uid://ce44420oiv8ag" path="res://sprites/static/Television_static.gif_frame_00004.jpg" id="7_5mkxt"]
|
||||
[ext_resource type="Texture2D" uid="uid://c70rsm4qog0st" path="res://sprites/cross.png" id="8_sawva"]
|
||||
[ext_resource type="AudioStream" uid="uid://lyi0tsusixqm" path="res://sounds/win.wav" id="10_5mkxt"]
|
||||
[ext_resource type="AudioStream" uid="uid://bslw2ywaqj57h" path="res://sounds/lose.wav" id="11_8t1w7"]
|
||||
|
||||
[sub_resource type="ViewportTexture" id="ViewportTexture_iix04"]
|
||||
viewport_path = NodePath("GameViewport")
|
||||
|
|
@ -26,7 +28,7 @@ frame_3/duration = 1.0
|
|||
frame_4/texture = ExtResource("7_5mkxt")
|
||||
frame_4/duration = 1.0
|
||||
|
||||
[node name="Control" type="Control" node_paths=PackedStringArray("offline_channel_cover", "static_channel_cover", "game_viewport", "result_cover")]
|
||||
[node name="Control" type="Control" node_paths=PackedStringArray("offline_channel_cover", "static_channel_cover", "game_viewport", "result_cover", "win_player", "lose_player")]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
|
|
@ -43,6 +45,8 @@ offline_channel_cover = NodePath("OfflineChannelCover")
|
|||
static_channel_cover = NodePath("Static")
|
||||
game_viewport = NodePath("GameViewport")
|
||||
result_cover = NodePath("GameResult")
|
||||
win_player = NodePath("winSound")
|
||||
lose_player = NodePath("loseSound")
|
||||
|
||||
[node name="GameDisplay" type="TextureRect" parent="."]
|
||||
layout_mode = 1
|
||||
|
|
@ -95,3 +99,9 @@ handle_input_locally = false
|
|||
canvas_item_default_texture_filter = 0
|
||||
size = Vector2i(640, 360)
|
||||
render_target_update_mode = 4
|
||||
|
||||
[node name="winSound" type="AudioStreamPlayer" parent="."]
|
||||
stream = ExtResource("10_5mkxt")
|
||||
|
||||
[node name="loseSound" type="AudioStreamPlayer" parent="."]
|
||||
stream = ExtResource("11_8t1w7")
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=17 format=3 uid="uid://ct8axfbvd2wn4"]
|
||||
[gd_scene load_steps=18 format=3 uid="uid://ct8axfbvd2wn4"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://d2q6xfk8htbyy" path="res://game_logic.gd" id="1_j5hk1"]
|
||||
[ext_resource type="PackedScene" uid="uid://63rik2noj8id" path="res://base modules/test_channel.tscn" id="1_mlf6e"]
|
||||
|
|
@ -14,6 +14,7 @@
|
|||
[ext_resource type="PackedScene" uid="uid://bcu5svl5gjd4r" path="res://games/reaction/reaction.tscn" id="11_opqoc"]
|
||||
[ext_resource type="Script" uid="uid://dgq2y6wjlye6" path="res://chatboxController.gd" id="11_ueiaa"]
|
||||
[ext_resource type="Script" uid="uid://dnptjh111yd8i" path="res://itemPopup.gd" id="12_daj04"]
|
||||
[ext_resource type="AudioStream" uid="uid://bjuvcg5wvqpuu" path="res://sounds/newthingget.ogg" id="15_opqoc"]
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_daj04"]
|
||||
font_size = 11
|
||||
|
|
@ -144,7 +145,7 @@ size_flags_vertical = 8
|
|||
text = "Press Enter..."
|
||||
label_settings = SubResource("LabelSettings_daj04")
|
||||
|
||||
[node name="Item Get Popup" type="PanelContainer" parent="Popup and Chat" node_paths=PackedStringArray("texture_rect", "label")]
|
||||
[node name="Item Get Popup" type="PanelContainer" parent="Popup and Chat" node_paths=PackedStringArray("texture_rect", "label", "item_get_sound")]
|
||||
visible = false
|
||||
custom_minimum_size = Vector2(200, 200)
|
||||
anchors_preset = 8
|
||||
|
|
@ -161,6 +162,7 @@ grow_vertical = 2
|
|||
script = ExtResource("12_daj04")
|
||||
texture_rect = NodePath("MarginContainer/VBoxContainer/TextureRect")
|
||||
label = NodePath("MarginContainer/VBoxContainer/Label2")
|
||||
item_get_sound = NodePath("itemGetSound")
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="Popup and Chat/Item Get Popup"]
|
||||
layout_mode = 2
|
||||
|
|
@ -200,6 +202,10 @@ size_flags_vertical = 8
|
|||
text = "Press Enter..."
|
||||
label_settings = SubResource("LabelSettings_daj04")
|
||||
|
||||
[node name="itemGetSound" type="AudioStreamPlayer" parent="Popup and Chat/Item Get Popup"]
|
||||
stream = ExtResource("15_opqoc")
|
||||
volume_db = -8.321
|
||||
|
||||
[node name="GameOverScreen" type="CanvasLayer" parent="."]
|
||||
visible = false
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ extends PanelContainer
|
|||
|
||||
@export var texture_rect : TextureRect
|
||||
@export var label : RichTextLabel
|
||||
@export var item_get_sound : AudioStreamPlayer
|
||||
var active : bool = false
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
|
|
@ -23,6 +24,7 @@ func showPopup(item_name : String, item_texture : Texture):
|
|||
label.text = item_name
|
||||
texture_rect.texture = item_texture
|
||||
active = true
|
||||
item_get_sound.play()
|
||||
GameManager.change_player_movement(false)
|
||||
|
||||
func hidePopup():
|
||||
|
|
|
|||
BIN
sounds/lose.wav
Normal file
BIN
sounds/lose.wav
Normal file
Binary file not shown.
24
sounds/lose.wav.import
Normal file
24
sounds/lose.wav.import
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://bslw2ywaqj57h"
|
||||
path="res://.godot/imported/lose.wav-cb4e7670a5fe2d89b40e499c15bd8f1b.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://sounds/lose.wav"
|
||||
dest_files=["res://.godot/imported/lose.wav-cb4e7670a5fe2d89b40e499c15bd8f1b.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_mode=0
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=2
|
||||
BIN
sounds/newthingget.ogg
Normal file
BIN
sounds/newthingget.ogg
Normal file
Binary file not shown.
19
sounds/newthingget.ogg.import
Normal file
19
sounds/newthingget.ogg.import
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
[remap]
|
||||
|
||||
importer="oggvorbisstr"
|
||||
type="AudioStreamOggVorbis"
|
||||
uid="uid://bjuvcg5wvqpuu"
|
||||
path="res://.godot/imported/newthingget.ogg-c881ff483c14755ab1839e8f27c950ef.oggvorbisstr"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://sounds/newthingget.ogg"
|
||||
dest_files=["res://.godot/imported/newthingget.ogg-c881ff483c14755ab1839e8f27c950ef.oggvorbisstr"]
|
||||
|
||||
[params]
|
||||
|
||||
loop=false
|
||||
loop_offset=0
|
||||
bpm=0
|
||||
beat_count=0
|
||||
bar_beats=4
|
||||
BIN
sounds/win.wav
Normal file
BIN
sounds/win.wav
Normal file
Binary file not shown.
24
sounds/win.wav.import
Normal file
24
sounds/win.wav.import
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://lyi0tsusixqm"
|
||||
path="res://.godot/imported/win.wav-d8985249cb4cbbaa02050ce18417b390.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://sounds/win.wav"
|
||||
dest_files=["res://.godot/imported/win.wav-d8985249cb4cbbaa02050ce18417b390.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_mode=0
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=2
|
||||
Loading…
Add table
Add a link
Reference in a new issue