Звук старта игры.
This commit is contained in:
parent
0e5411bb52
commit
aeb83e5566
@ -18,6 +18,8 @@ public class AudioSwitcher : MonoBehaviour
|
|||||||
s.source.volume = s.volume;
|
s.source.volume = s.volume;
|
||||||
s.source.pitch = s.pitch;
|
s.source.pitch = s.pitch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Play("Startgame");
|
||||||
/*
|
/*
|
||||||
foreach(Sounds p in phrases)
|
foreach(Sounds p in phrases)
|
||||||
{
|
{
|
||||||
|
19
Assets/Scripts/Audio/Gameover.cs
Normal file
19
Assets/Scripts/Audio/Gameover.cs
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.Audio;
|
||||||
|
|
||||||
|
public class Gameover : MonoBehaviour
|
||||||
|
{
|
||||||
|
public AudioSource source;
|
||||||
|
public GameObject fake;
|
||||||
|
|
||||||
|
// Update is called once per frame
|
||||||
|
void Update()
|
||||||
|
{
|
||||||
|
if(fake.activeSelf == true && Extralife.staticLives < 1 )
|
||||||
|
{
|
||||||
|
source.Play();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
11
Assets/Scripts/Audio/Gameover.cs.meta
Normal file
11
Assets/Scripts/Audio/Gameover.cs.meta
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 393d2b0e827f7c4498aa535f4ef132f0
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
Loading…
x
Reference in New Issue
Block a user