List<Bitmap> avatars = new List<Bitmap>();
private void GameForm_Load(object sender, EventArgs e)
{
avatars.Add(Properties.Resources.Head1);
avatars.Add(Properties.Resources.Head2);
avatars.Add(Properties.Resources.Head3);
avatars.Add(Properties.Resources.Head4);
}
private void pictureBoxAvatar1_Click(object sender, EventArgs e)
{
if(pictureBoxAvatar1.Image == avatars.ElementAt(0))
{
pictureBoxAvatar1.Image = avatars.ElementAt(1);
}
//I have four total possibilities, but just have this one statement until I figure it out
}
private void pictureBoxAvatar1_Click(object sender, EventArgs e)
{
pictureBoxAvatar1.ImagePointer = (pictureBoxAvatar1.ImagePointer + 1) % avatars.size();
}
int avIndex = avatars.IndexOf(picturebox1.image);
avIndex++;
if (avIndex >= avatars.Count)
{
avIndex = 0;
}
picturebox1.image = avatars[avIndex];