private void updateDrawImage(Graphics graphics, Bitmap newHero, TYPESOFCLOTHING type) { Clothing clothing = Outfit[(int)type]; if (clothing != null) { graphics.DrawImage(clothing.Image, 0, 0, newHero.Size.Width, newHero.Size.Height); } }
private void changeIndividualClothingItems(ListBox listBox, TYPESOFCLOTHING typeOfClothing) { Clothing clothing = ((KeyValuePair <string, Clothing>)listBox.SelectedItem).Value; hero.changeClothing(typeOfClothing, clothing); dressUpPictureBox.Image = hero.DressedHero; Score = hero.OutfitScore; scoreLbl.Text = Score.ToString(); }
private int getHerosOutfitItem(TYPESOFCLOTHING typeOfClothing) { int storedUniqueItemNumber = 0; try { storedUniqueItemNumber = hero.Outfit[(int)typeOfClothing].Saved_ClothingUniqueItemEnumNumer; } catch { //if I fail to return anything from the above search, default to 0 position return(0); } if (typeOfClothing == TYPESOFCLOTHING.FACE) { return(storedUniqueItemNumber); } else { return(storedUniqueItemNumber + 1); } }
public void changeClothing(TYPESOFCLOTHING typeOfClothing, Clothing clothing) { Outfit[(int)typeOfClothing] = clothing; DressedHero = dressHero(); }