// Use this for initialization void Awake() { // Set initial values _keyModel = null; // Get required components _handler = GetComponent<LetterHandler> (); }
public void Hide() { for (int i = 0; i < letters.Count; i++) { LetterHandler letter = letters[i]; letter.Hide(); } }
public void Reveal() { for (int i = 0; i < letters.Count; i++) { LetterHandler letter = letters[i]; LeanTween.delayedCall(timeBetweenLetterReveals * i, letter.Reveal); } }
public void ForEach(LetterHandler handler) { foreach (Transform letterTransform in transform) { Debug.Log("letter transform: " + letterTransform); Debug.Log("letter go: " + letterTransform.gameObject.name); handler(letterTransform.gameObject.GetComponent <Letter>()); } }