Merge branch 'master' of https://github.com/SweetTini/GlobalGameJam2020
This commit is contained in:
21
Assets/Scripts/SceneLodarManual.cs
Normal file
21
Assets/Scripts/SceneLodarManual.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class SceneLodarManual : MonoBehaviour
|
||||
{
|
||||
public Button button;
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
button.onClick.AddListener(LoadScene);
|
||||
}
|
||||
|
||||
void LoadScene()
|
||||
{
|
||||
SceneManager.LoadScene("LevelOne");
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/SceneLodarManual.cs.meta
Normal file
11
Assets/Scripts/SceneLodarManual.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 14c874c8615088f458e5473b40714b56
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -36,43 +36,46 @@ public class SoundManagerScript : MonoBehaviour
|
||||
|
||||
public static void PlaySound(string clip)
|
||||
{
|
||||
AudioClip sound = null;
|
||||
switch (clip)
|
||||
{
|
||||
case "jump":
|
||||
audioSrc.PlayOneShot(jumpSound);
|
||||
sound = jumpSound;
|
||||
break;
|
||||
case "scream":
|
||||
audioSrc.PlayOneShot(screamSound);
|
||||
sound = screamSound;
|
||||
break;
|
||||
case "wrong":
|
||||
audioSrc.PlayOneShot(wrongButtonSound);
|
||||
sound = wrongButtonSound;
|
||||
break;
|
||||
case "bug laugh":
|
||||
audioSrc.PlayOneShot(bugLaughSound);
|
||||
sound = bugLaughSound;
|
||||
break;
|
||||
case "drink":
|
||||
audioSrc.PlayOneShot(drinkSound);
|
||||
sound = drinkSound;
|
||||
break;
|
||||
case "eat":
|
||||
audioSrc.PlayOneShot(eatSound);
|
||||
sound = eatSound;
|
||||
break;
|
||||
case "punch":
|
||||
audioSrc.PlayOneShot(punchSound);
|
||||
sound = punchSound;
|
||||
break;
|
||||
case "hard punch":
|
||||
audioSrc.PlayOneShot(hardPunchSound);
|
||||
sound = hardPunchSound;
|
||||
break;
|
||||
case "slap":
|
||||
audioSrc.PlayOneShot(slapSound);
|
||||
sound = slapSound;
|
||||
break;
|
||||
case "hard slap":
|
||||
audioSrc.PlayOneShot(hardSlapSound);
|
||||
sound = hardSlapSound;
|
||||
break;
|
||||
case "win":
|
||||
audioSrc.clip = winSound;
|
||||
audioSrc.PlayOneShot(winSound);
|
||||
sound = winSound;
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
audioSrc.clip = sound;
|
||||
audioSrc.PlayOneShot(sound);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user