Prepare for D-Day
This commit is contained in:
parent
92c3101db8
commit
7cac7aa9ca
File diff suppressed because one or more lines are too long
@ -380,13 +380,17 @@ public class HangmanController : AbstractFeedback
|
||||
/// </summary>
|
||||
private void PickRandomWord()
|
||||
{
|
||||
// vvv DEMO DAY STUFF vvv
|
||||
currentWord = "DEMO DAY";
|
||||
return;
|
||||
// ^^^ DEMO DAY STUFF ^^^
|
||||
|
||||
// Get a random index for the themes
|
||||
// Then get a random index for a word to pull
|
||||
|
||||
// First get random index for the themes
|
||||
//int amountThemes = themeList.themes.Count;
|
||||
//int themeIndex = Random.Range(0, amountThemes);
|
||||
int themeIndex = 0; // Geography theme
|
||||
int amountThemes = themeList.themes.Count;
|
||||
int themeIndex = Random.Range(0, amountThemes);
|
||||
|
||||
// Check how many words are in this theme
|
||||
int amountWords = themeList.themes[themeIndex].learnables.Count;
|
||||
@ -520,7 +524,7 @@ public class HangmanController : AbstractFeedback
|
||||
// The current sign was accepted, return to the game
|
||||
mode = 2;
|
||||
|
||||
if (corrects == currentWord.Length)
|
||||
if (corrects == currentWord.Replace(" ", "").Length)
|
||||
{
|
||||
// Victory, deactivate the model and show the scoreboard
|
||||
ActivateWin();
|
||||
@ -626,7 +630,7 @@ public class HangmanController : AbstractFeedback
|
||||
/// <param name="word">The word to display</param>
|
||||
private void DisplayWord(string word)
|
||||
{
|
||||
for (int i = 0; i < word.Length; i++)
|
||||
foreach (Char c in word)
|
||||
{
|
||||
// Create instance of prefab
|
||||
GameObject instance = GameObject.Instantiate(letterPrefab, letterContainer);
|
||||
@ -636,7 +640,7 @@ public class HangmanController : AbstractFeedback
|
||||
Image background = instance.GetComponent<Image>();
|
||||
background.color = Color.clear;
|
||||
TMP_Text txt = instance.GetComponentInChildren<TMP_Text>();
|
||||
txt.text = Char.ToString('_');
|
||||
txt.text = c == ' ' ? "" : Char.ToString('_');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -14,5 +14,6 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
currentSongIndex: 0
|
||||
songs:
|
||||
- {fileID: 11400000, guid: fdccebd0ec4017441ae140542f5eee28, type: 2}
|
||||
- {fileID: 11400000, guid: 0f5b5e156c628bf189df5723ad2aab96, type: 2}
|
||||
- {fileID: 11400000, guid: 7a55c88547b9345fe87aecd1398550c9, type: 2}
|
||||
|
||||
18
Assets/JustSign/ScriptableObjects/We Will Rock You.asset
Normal file
18
Assets/JustSign/ScriptableObjects/We Will Rock You.asset
Normal file
@ -0,0 +1,18 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: cd3d1c3a6cf7ef07abb343f8862a7435, type: 3}
|
||||
m_Name: We Will Rock You
|
||||
m_EditorClassIdentifier:
|
||||
firstSymbolTime: 0.1
|
||||
spawnPeriod: 4.42
|
||||
duration: 64
|
||||
song: {fileID: 8300000, guid: d2d246582fe87b54cbca0e1a5b0f739f, type: 3}
|
||||
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fdccebd0ec4017441ae140542f5eee28
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -379,7 +379,7 @@ public class JustSignController : AbstractFeedback
|
||||
|
||||
// Spawn new symbol every spawn period
|
||||
float currentTime = Time.time;
|
||||
if (currentTime - lastSpawn > 2 * currentSong.spawnPeriod && lastSymbolTime > currentTime)
|
||||
if (currentTime - lastSpawn > currentSong.spawnPeriod && lastSymbolTime > currentTime)
|
||||
{
|
||||
lastSpawn = currentTime;
|
||||
SpawnNewSymbol();
|
||||
|
||||
BIN
Assets/JustSign/Songs/We Will Rock You - 1min.mp3
Normal file
BIN
Assets/JustSign/Songs/We Will Rock You - 1min.mp3
Normal file
Binary file not shown.
22
Assets/JustSign/Songs/We Will Rock You - 1min.mp3.meta
Normal file
22
Assets/JustSign/Songs/We Will Rock You - 1min.mp3.meta
Normal file
@ -0,0 +1,22 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d2d246582fe87b54cbca0e1a5b0f739f
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 6
|
||||
defaultSettings:
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 1
|
||||
conversionMode: 0
|
||||
platformSettingOverrides: {}
|
||||
forceToMono: 0
|
||||
normalize: 1
|
||||
preloadAudioData: 1
|
||||
loadInBackground: 0
|
||||
ambisonic: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/JustSign/Songs/We Will Rock You - 30sec.mp3
Normal file
BIN
Assets/JustSign/Songs/We Will Rock You - 30sec.mp3
Normal file
Binary file not shown.
22
Assets/JustSign/Songs/We Will Rock You - 30sec.mp3.meta
Normal file
22
Assets/JustSign/Songs/We Will Rock You - 30sec.mp3.meta
Normal file
@ -0,0 +1,22 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 67374b610386f4840b84569282792772
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 6
|
||||
defaultSettings:
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 1
|
||||
conversionMode: 0
|
||||
platformSettingOverrides: {}
|
||||
forceToMono: 0
|
||||
normalize: 1
|
||||
preloadAudioData: 1
|
||||
loadInBackground: 0
|
||||
ambisonic: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/JustSign/Songs/We Will Rock You.mp3
Normal file
BIN
Assets/JustSign/Songs/We Will Rock You.mp3
Normal file
Binary file not shown.
22
Assets/JustSign/Songs/We Will Rock You.mp3.meta
Normal file
22
Assets/JustSign/Songs/We Will Rock You.mp3.meta
Normal file
@ -0,0 +1,22 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c6d598be536f9cb4585670869e7041bd
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 6
|
||||
defaultSettings:
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 1
|
||||
conversionMode: 0
|
||||
platformSettingOverrides: {}
|
||||
forceToMono: 0
|
||||
normalize: 1
|
||||
preloadAudioData: 1
|
||||
loadInBackground: 0
|
||||
ambisonic: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -165,7 +165,7 @@ PlayerSettings:
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 11400000, guid: 0ae0248e3ef962f4b8280ee4a7f1c4ec, type: 2}
|
||||
- {fileID: 0}
|
||||
metroInputSource: 0
|
||||
wsaTransparentSwapchain: 0
|
||||
m_HolographicPauseOnTrackingLoss: 1
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user