Ejemplo n.º 1
0
 /// <summary>
 /// create the selected character
 /// </summary>
 /// <param name="createdCharacter">A fully completed mixed up character</param>
 /// <param name="pbHead">Picture box for head</param>
 /// <param name="pbBody">Picturebox for body</param>
 /// <param name="pbLegs">Picturebox for legs</param>
 public CharacterOutput(Character createdCharacter, PictureBox pbHead, PictureBox pbBody, PictureBox pbLegs)
 {
     this.createdCharacter = createdCharacter;
     this.pbHead = pbHead;
     this.pbBody = pbBody;
     this.pbLegs = pbLegs;
 }
Ejemplo n.º 2
0
        public void Run(int newHead, int newBody, int newFeet)
        {
            character = maker.createCharacter(newHead, newBody, newFeet);

            pictureBoxes[0].Image = character.Head.Image;
            pictureBoxes[1].Image = character.Body.Image;
            pictureBoxes[2].Image = character.Feet.Image;
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Create a new mixed up character from parts
 /// </summary>
 /// <param name="head">Name of the head</param>
 /// <param name="body">Name of the body</param>
 /// <param name="legs">Name of the legs</param>
 /// <returns>Newly created Character</returns>
 public Character createCharacterFromSelection(string head, string body, string legs)
 {
     //Set up placeholder character
     Character newCharacter = new Character();
     //Get the individual parts
     newCharacter.myHead = getHeadFromSelection(head);
     newCharacter.myBody = getBodyFromSelection(body);
     newCharacter.myLegs = getLegsFromSelection(legs);
     return newCharacter;
 }
        //returns a list of bitmaps based off of a characters properties
        public List<Bitmap> printCharacter(Character charToPrint, string fileExtension)
        {
            List<Bitmap> output = new List<Bitmap>();
            //top img
            Bitmap topImage = (Bitmap)Image.FromFile(charToPrint.Head + fileExtension);
            output.Add(topImage);
            //mid img
            Bitmap midImage = (Bitmap)Image.FromFile(charToPrint.Body + fileExtension);
            output.Add(midImage);
            //bottom img
            Bitmap bottomImage = (Bitmap)Image.FromFile(charToPrint.Legs + fileExtension);
            output.Add(bottomImage);

            return output;
        }
 public Character createCharacter(string head, string body, string legs)
 {
     Character createCharacter = new Character("new", head, body, legs);
     return createCharacter;
 }