public static void loadWords() { JSONObject wordsText = null; if (json != null) { wordsText = json["words"]; } else { loadFile (); loadWords(); } for (int i=0; i < wordsText.Count; i++) { Word word = new Word (); JSONObject wordText = wordsText[i]; string complete = wordText["complete"].ToString().Trim('"'); word.setComplete(complete); JSONObject emojisText = wordText["emojis"]; List<Emoji> emojis = new List<Emoji>(); for (int e=0; e < emojisText.Count; e++) { Emoji emoji = new Emoji(); JSONObject etext = emojisText[e]; string wordAText = etext["word"].ToString().Trim('"'); if (wordAText == "") { break; } string color = etext["color"].ToString().Trim('"'); string filename = findEmojiForWord(wordAText); emoji.setColor(color); emoji.setWord(wordAText); emoji.setFilename(filename); if (unlockAll) { addToUnlocked(filename); } emojis.Add(emoji); } word.setEmojis(emojis); words.Add (word); } //int count = wordsText.Count; //for (int l=0; l < count; l++) { // if (unlockAll) { // emojis.Add (emojis[l]); // } //} //printOutUnused(); }