/// <summary> /// Start this instance. /// </summary> void Start() { // If the master context pack should be rebuilt if (REBUILD_MASTER_CONTEXT_PACK_JSON) { ContextPackFactory.buildContextPacks(); } // Initialize word bank with context packs from master context pack file setupWordBank(); }
/// <summary> /// Sets up the word bank by loading in all context pack words. /// </summary> private void setupWordBank() { // Load in all context packs contextPacks = ContextPackFactory.loadContextPacks(); // Calculate total number of words for (int contextPack = 0; contextPack < contextPacks.Length; ++contextPack) { totalWords += contextPacks [contextPack].words.Length; } // Determine the number of word bank columns totalColumns = calculateTotalColumns(); // Retrieve and build word bank columns buildWordBankColumns(); // Populate word tiles within word bank columns populateWordTiles(); }