private void Awake() { Instance = this; _buttons = ButtonRoot.GetComponentsInChildren <LetterButton>().ToList(); _letters = new LetterController(LetterRoot.GetComponentsInChildren <LetterCell>().ToList()); _letters.Reset(); foreach (var button in _buttons) { button.OnLetter += ButtonOnLetter; } }
public LetterController(List <LetterCell> letters) { _letters = letters.OrderBy(l => l.Index).ToList(); Instance = this; }