I am trying to make a hangman game, but I don't quite know how to handle the input. I would like to have a string that I could then compare to the word the player is guessing.
if (Input.GetKeyDown(KeyCode.A))
{
answer = "A"
}
else if (Input.GetKeyDown(KeyCode.B))
{
answer = "B"
}
I know I could just repeat this 13 times but I was wondering if there is a better way of doing things.