How To Make Hangman body parts (GUI)?

hey guys , im making hangman game. i have images of hangman parts and a background save donto my desktop , how would i go about building the GUI , like say if i get a letter wrong then it draws a head etc? here is my code

public string words;
private int lifes = 7;
private string userInput = “”;
private string guessedWord = “”;
public string wordChosen = “”;

private void Start()
{
wordChosen = words[Random.Range(0, words.Length)];
guessedWord = new string(“-”[0] , wordChosen.Length);
}

private void OnGui()
{
if (lifes > 0 && guessedWord != wordChosen)
{
GUILayout.Label(lifes.ToString());
GUILayout.Box(guessedWord);
userInput = GUILayout.TextField(userInput , GUILayout.Width(200));
if(GUILayout.Button(“Try”))
{

   if (userInput.Length == 1)
   CheckChar(userInput[0]);

   else if (userInput.Length > 1)
     {

     if (wordChosen == userInput)
      guessedWord = userInput;
     }

   else
     print("Please Enter One Character At A Time :)");
     userInput = "";


   }

}
else
{
   if (lifes > 0)
     GUILayout.Box("Congratulations! You Win!");
   else
     GUILayout.Box(" Awww You Lose :(");
}

}

private void CheckChar(char c)
{

bool charExists = false;
for(int x = 0; x < wordChosen.Length; x++)
{

if (wordChosen[x] == c)
   {
     charExists = true;
     string temp = guessedWord.Substring(0 , x);
     guessedWord = temp + c.ToString() + guessedWord.Substring(x + 1, guessedWord.Length - x - 1);
   }
}

if(!charExists)
   lifes --;

}

There are a lot of different ways to implement this functionality. One simple way is to implement it like a flip book. That is you create a series of images. The first is just the background. The second is the background and the head. The third is the background head and neck. And so on. If the images were printed on index cards, you could flip through them and watch the hanged man being assembled. Then in code you could just step from one image to the next.

Take this script and attach it to a GUITexture (not a texture drawn with GUI.DrawTexture()). Select the GUITexture object in the hierarchy and in the inspector, open up the textures array, set the number of entries and drag and drop all the flip pages onto the variables. Hit play. The ‘N’ key will advance to the next image.

#pragma strict

var textures : Texture[];
private var guitexture : GUITexture;
private var iTex = 0;

function Start () {
  guitexture = GetComponent(GUITexture);
  guitexture.texture = textures[0];
}

function Update () {

	if (Input.GetKeyDown(KeyCode.N)) {
		iTex = (iTex + 1) % textures.Length;
		guitexture.texture = textures[iTex];
	}
}