diff --git a/Assets/Scipts/CharacterMovement.cs b/Assets/Scipts/CharacterMovement.cs index 4b32d56..50710ae 100644 --- a/Assets/Scipts/CharacterMovement.cs +++ b/Assets/Scipts/CharacterMovement.cs @@ -66,7 +66,10 @@ public class CharacterMovement : MonoBehaviour { public void Greet() { - Cheer.Play(); + if (Cheer != null) + { + Cheer.Play(); + } //Trigger animation } } diff --git a/Assets/Scipts/PlayerControllers/LocalPlayer.cs b/Assets/Scipts/PlayerControllers/LocalPlayer.cs index 9370e22..9b7f574 100644 --- a/Assets/Scipts/PlayerControllers/LocalPlayer.cs +++ b/Assets/Scipts/PlayerControllers/LocalPlayer.cs @@ -52,7 +52,7 @@ public class LocalPlayer : Player { } Animator.SetFloat("WalkSpeed", animWalkSpeed); - if (WalkingSounds.isPlaying != true) + if ( WalkingSounds != null && WalkingSounds.isPlaying != true) { WalkingSounds.Play(); } diff --git a/Assets/Scipts/SoundManager.cs b/Assets/Scipts/SoundManager.cs index 3bf9509..9a0fbe8 100644 --- a/Assets/Scipts/SoundManager.cs +++ b/Assets/Scipts/SoundManager.cs @@ -12,9 +12,13 @@ public class SoundManager : MonoBehaviour { AudioSource curMusic; public void Start() { - Startmusic.Play(); - StartCoroutine(ChangeMusic(loopMusic, Startmusic.clip.length)); - StartCoroutine(ChangeMusic(loopMusic, gameLength - 10.0f)); + if (Startmusic != null) + { + curMusic = Startmusic; + Startmusic.Play(); + StartCoroutine(ChangeMusic(loopMusic, Startmusic.clip.length)); + StartCoroutine(ChangeMusic(loopMusic, gameLength - 10.0f)); + } } private void Update() diff --git a/Assets/WorldAssets.meta b/Assets/WorldAssets.meta deleted file mode 100644 index b49880d..0000000 --- a/Assets/WorldAssets.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 7da0e8d0a6415f944aa43dff57b38ae3 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: