public void learnedLetter(string letter) { dictionaryprogress dicProg = GameObject.Find("Progress").GetComponent <dictionaryprogress>(); progressDic[letter] = "Unlocked"; dicProg.DicUpdate(letter); }
public void getImage(TMP_Text line) { string currState = ""; if (UnityEngine.SceneManagement.SceneManager.GetActiveScene().name == "02TutorialScene") { if (progressDic.TryGetValue(line.text, out currState) && currState == "Unlocked") { playSound.changeSound(line.text); try { currDef.sprite = Resources.Load <Sprite>("pos/pos_" + line.text.ToLower()); } catch (System.Exception) { Debug.Log("File is not in Resources folder."); } } else { playSound.changeSound(null); notLearned(); } } else { dictionaryprogress dicProg = GameObject.Find("Progress").GetComponent <dictionaryprogress>(); if (dicProg.checkLetter(line.text, currState)) { playSound.changeSound(line.text); try { currDef.sprite = Resources.Load <Sprite>("pos/pos_" + line.text.ToLower()); } catch (System.Exception) { Debug.Log("File is not in Resources folder."); } if (dicProg.checkedLetter == line.text) { dicProg.letterChecked(); } } else { playSound.changeSound(null); notLearned(); } } }
private void Start() { dictionaryprogress prog = GameObject.Find("Progress").GetComponent <dictionaryprogress>(); SetLevel(prog.returnVolume()); }