public void OnSolutionCharButtonClicked(CharacterButton solutionCharButton) { var displayCharButton = displayCharacters[solutionCharButton.Index]; solutionCharButton.Letter = CharacterButton.NoCharacter; displayCharButton.ShowLetter(); }
private void AddNewDisplayCharToList(float xCenter, float yCenter, int index) { var newCharButton = new CharacterButton(xCenter, yCenter, this); newCharButton.Clicked += newCharButton.OnDisplayCharButtonClicked; newCharButton.Index = index; displayCharacters.Add(newCharButton); }
private void AddNewSolutionButtonToList(float xCenter, float yCenter, int index) { CharacterButton newCharButton = new CharacterButton(xCenter, yCenter, this); newCharButton.Clicked += newCharButton.OnSolutionCharButtonClicked; newCharButton.Index = index; solutionCharacters.Add(newCharButton); }
public void OnDisplayCharButtonClicked(CharacterButton displayCharButton) { var freeButton = FindNextFreeSolutionButton(); if (freeButton == null) return; freeButton.Letter = displayCharButton.Letter; freeButton.Index = displayCharButton.Index; displayCharButton.RemoveLetter(); if (IsWordCorrect()) CompleteLevel(); }
public void OnDisplayCharButtonClicked(CharacterButton displayCharButton) { var freeButton = FindNextFreeSolutionButton(); if (freeButton == null) { return; } freeButton.Letter = displayCharButton.Letter; freeButton.Index = displayCharButton.Index; displayCharButton.RemoveLetter(); if (IsWordCorrect()) { CompleteLevel(); } }