Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
LnWPhase2BackUp
Unityroulette2
Commits
4f6ceb91
Commit
4f6ceb91
authored
2 years ago
by
Pilla Satya Sai Koushi
Browse files
Options
Download
Email Patches
Plain Diff
AudioControls(UGSQUAD2_58)
parent
345a8e1b
Koushik_Chennai_Sprint1
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Assets/Scripts/SFX.cs
+38
-0
Assets/Scripts/SFX.cs
with
38 additions
and
0 deletions
+38
-0
Assets/Scripts/SFX.cs
0 → 100644
View file @
4f6ceb91
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
public
class
SFX
:
MonoBehaviour
{
public
static
SFX
instance
;
// Start is called before the first frame update
private
AudioSource
audioSource
;
public
AudioClip
placebetaudio
;
public
AudioClip
winAudio
;
public
AudioClip
lossAudio
;
void
Start
()
{
instance
=
this
;
audioSource
=
GetComponent
<
AudioSource
>();
}
// Update is called once per frame
public
void
PlaceBetAudio
()
{
audioSource
.
PlayOneShot
(
placebetaudio
);
}
public
void
WinAudio
()
{
audioSource
.
PlayOneShot
(
winAudio
);
}
public
void
LossAudio
()
{
audioSource
.
PlayOneShot
(
lossAudio
);
AudioManager
.
Instance
.
changeVolume
(
AudioType
.
BgMusic
,
0.2f
);
}
}
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help