// Indicates a change in the solving slots public void HasChanged() { Debug.Log("LC: HAS CHANGED"); Debug.Log("LC: Keyboard Helper says " + helper.GetType().ToString()); Debug.Log("CURRENT SLOT INDEX: " + helper.currentSlotIndex); // String to store the order of the letters System.Text.StringBuilder builder = new System.Text.StringBuilder(); // Loop through each letter contained in the solving section foreach (Transform slotTransform in slots) { // Get the letter stored in the slot GameObject letter = slotTransform.GetComponent <Slot>().letter; // If the slot contains a letter, append it to the string if (letter) { // Extract the letter from the full letter string Ex. Letter_A(Clone) position 7 = a char letterName = char.ToLower(letter.name[7]); // Append the letter to the builder builder.Append(letterName); } } // Finalize the string string wordProgress = builder.ToString(); Debug.Log("LC: Word progress is " + wordProgress); // Detect if the word has been solved if (helper.CheckForMatch(wordProgress)) { helper.gameComplete = true; helper.currentSlotIndex = 0; isAnimationLooping = false; Debug.Log("LC: Found a match!"); firstHasBeenPlayed = false; helper.WordSolved(); } }