Ejemplo n.º 1
0
        private void JediImageValidation(IJedi jediCharacter, PictureBox paduin)
        {
            try
            {
                image = Image.FromFile(jediCharacter.CharacterImage);

                paduin.Image  = image;
                paduin.Height = image.Height;
                paduin.Width  = image.Width;
            }
            catch (FileNotFoundException)
            {
                throw new FileNotFoundException("The path of " + jediCharacter.GetType().Name + " is not in the correct format !");
            }
        }
Ejemplo n.º 2
0
        private void JediInitialization()
        {
            //Jedi
            if (Jedi.FinalCharacter == 1)
            {
                this.jedi = JediFactory.CreatJedi(JediType.JoNakov);
                JediImageValidation(this.jedi, enemyBox);
            }
            else if (Jedi.FinalCharacter == 2)
            {
                this.jedi = JediFactory.CreatJedi(JediType.AchoUanKenobi);
                JediImageValidation(jedi, enemyBox);
            }
            else if (Jedi.FinalCharacter == 3)
            {
                this.jedi = JediFactory.CreatJedi(JediType.RoyalSkyWalker);
                JediImageValidation(jedi, enemyBox);
            }
            else if (Jedi.FinalCharacter == 4)
            {
                this.jedi = JediFactory.CreatJedi(JediType.NaskoSolo);
                JediImageValidation(jedi, enemyBox);
            }

            //AssistentJedi
            if (Jedi.FinalAssistantCharacter == 1)
            {
                this.assistantsJedi = AssistantJediFactory.CreateJediАsistant(AssistantJediType.ChubiEdo);
                AssistantImageValidation(this.assistantsJedi, pictureBox1);
            }
            else if (Jedi.FinalAssistantCharacter == 2)
            {
                this.assistantsJedi = AssistantJediFactory.CreateJediАsistant(AssistantJediType.R2Trifon2);
                AssistantImageValidation(this.assistantsJedi, pictureBox1);
            }
        }
Ejemplo n.º 3
0
        private void JediInitialization()
        {
            //Jedi
            if (Jedi.FinalCharacter == 1)
            {
                this.jedi = JediFactory.CreatJedi(JediType.JoNakov);
                JediImageValidation(this.jedi, enemyBox);
            }
            else if (Jedi.FinalCharacter == 2)
            {
                this.jedi = JediFactory.CreatJedi(JediType.AchoUanKenobi);
                JediImageValidation(jedi, enemyBox);
            }
            else if (Jedi.FinalCharacter == 3)
            {
                this.jedi = JediFactory.CreatJedi(JediType.RoyalSkyWalker);
                JediImageValidation(jedi, enemyBox);
            }
            else if (Jedi.FinalCharacter == 4)
            {
                this.jedi = JediFactory.CreatJedi(JediType.NaskoSolo);
                JediImageValidation(jedi, enemyBox);
            }

            //AssistentJedi
            if (Jedi.FinalAssistantCharacter == 1)
            {
                this.assistantsJedi = AssistantJediFactory.CreateJediАsistant(AssistantJediType.ChubiEdo);
                AssistantImageValidation(this.assistantsJedi, pictureBox1);

            }
            else if (Jedi.FinalAssistantCharacter == 2)
            {
                this.assistantsJedi = AssistantJediFactory.CreateJediАsistant(AssistantJediType.R2Trifon2);
                AssistantImageValidation(this.assistantsJedi, pictureBox1);
            }
        }
Ejemplo n.º 4
0
        private void JediImageValidation(IJedi jediCharacter, PictureBox paduin)
        {
            try
            {
                image = Image.FromFile(jediCharacter.CharacterImage);

                paduin.Image = image;
                paduin.Height = image.Height;
                paduin.Width = image.Width;
            }
            catch (FileNotFoundException)
            {
                throw new FileNotFoundException("The path of " + jediCharacter.GetType().Name + " is not in the correct format !");
            }
        }
Ejemplo n.º 5
0
 public void action(IJedi jedi)
 {
     throw new NotImplementedException();
 }
Ejemplo n.º 6
0
 public void action(IJedi jedi)
 {
     jedi.action(this.Action);
 }