diff --git a/Assets/Audio SFX/incorrect-buzzer-sound-147336.mp3 b/Assets/Audio SFX/incorrect-buzzer-sound-147336.mp3 new file mode 100644 index 0000000..b88a452 --- /dev/null +++ b/Assets/Audio SFX/incorrect-buzzer-sound-147336.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f7793c4f4799f7f9b2d7b858352d8af0c7f93733efa676d2b33d727577e9775e +size 100310 diff --git a/Assets/Audio SFX/incorrect-buzzer-sound-147336.mp3.meta b/Assets/Audio SFX/incorrect-buzzer-sound-147336.mp3.meta new file mode 100644 index 0000000..9e9c479 --- /dev/null +++ b/Assets/Audio SFX/incorrect-buzzer-sound-147336.mp3.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: 6a8e3f6dace40f549802ccbfb7b9cb4e +AudioImporter: + externalObjects: {} + serializedVersion: 7 + defaultSettings: + serializedVersion: 2 + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/CameraManager.cs b/Assets/Scripts/CameraManager.cs index 0504a68..511ec47 100644 --- a/Assets/Scripts/CameraManager.cs +++ b/Assets/Scripts/CameraManager.cs @@ -10,6 +10,7 @@ public class CameraManager : MonoBehaviour public Button resumeButton; public RawImage photoBox; private Texture2D photo; + private int numberOfWebcams; // Start is called before the first frame update void OnEnable() @@ -26,6 +27,7 @@ void OnDisable() void Start() { wDevice = WebCamTexture.devices.FirstOrDefault(x => x.isFrontFacing == false); + numberOfWebcams = WebCamTexture.devices.Count(); } // Update is called once per frame @@ -126,7 +128,7 @@ public Texture2D GetPhoto() return photo; } - if (!wTexture || WebCamTexture.devices.Count() < 1) + if (!wTexture || numberOfWebcams < 1) { return null; } diff --git a/Assets/Scripts/GameManager.cs b/Assets/Scripts/GameManager.cs index 43ab768..09831c7 100644 --- a/Assets/Scripts/GameManager.cs +++ b/Assets/Scripts/GameManager.cs @@ -321,11 +321,10 @@ private void OnRoomUpdate(object sender, ValueChangedEventArgs e) } case (int)GameState.WaitingForOtherPlayersToJoin: { - if (!HomeConnection.activeInHierarchy) - { - CheckIfIAmTheFirst(myRoom.GetPlayerList()); - UpdateDisplayedListUser(myRoom.GetPlayerList()); - } + + CheckIfIAmTheFirst(myRoom.GetPlayerList()); + UpdateDisplayedListUser(myRoom.GetPlayerList()); + break; } case (int)GameState.Explanation: @@ -336,7 +335,7 @@ private void OnRoomUpdate(object sender, ValueChangedEventArgs e) } WaitingRoom.SetActive(false); BeforeStart.SetActive(true); - endOfExplanationDate = DateTime.Now.AddSeconds(3); + endOfExplanationDate = DateTime.Now.AddSeconds(4); break; }