예제 #1
0
        static void Main(string[] args)
        {
            // fields
            Character characterTest = new Character();  // variable to test the character class.
            Hero heroTest = new Hero();                 // variable to test the hero class.
            Hero hero1 = new SoftwareEngineer("Stuart", true);        // variable to test the S.E. class as a Hero.
            Enemy enemyTest = new Enemy();              // variable to test the enemy class.

            // test content of the Character and hero class.
            //Console.WriteLine("\n" + heroTest.toString());

            // test content of the Enemy class.
            //Console.WriteLine(enemyTest.ToString());

            // test content of the software engineer as a hero.
            Console.WriteLine(hero1.ToString());

            // hold the terminal open to view the stats.
            Console.ReadLine();
        }
        private void CustomizeXButton_Click(object sender, RoutedEventArgs e)
        {
            CustomizeWindowGrid.Visibility = Visibility.Hidden;
            BlackOut.Visibility = Visibility.Hidden;

            tempName = null;
            tempGender = false;
            tempJobRole = null;
            tempHero = null;
        }
        private void InformationSecurityButton_Click(object sender, RoutedEventArgs e)
        {
            tempJobRole = "Information Security";
            SoftwareEngineerButton.Style = blank;
            SupportEngineerButton.Style = blank;
            SystemsAnalystButton.Style = blank;
            NetworkArchitectButton.Style = blank;
            InformationSecurityButton.Style = red;

            tempHero = new InformationSecurity(tempName, tempGender);

            tempPhoto.Source = tempHero.CharacterPortrait;

            JobDescription.SelectAll();
            JobDescription.Selection.Text = ("Information Security:\nWeakest defense in the game but make up for it in" +
                                        "movement speed and evasion.");
        }
        private void NetworkArchitectButton_Click(object sender, RoutedEventArgs e)
        {
            tempJobRole = "Network Architect";
            SoftwareEngineerButton.Style = blank;
            SupportEngineerButton.Style = blank;
            SystemsAnalystButton.Style = blank;
            NetworkArchitectButton.Style = red;
            InformationSecurityButton.Style = blank;

            tempHero = new NetworkArchitect(tempName, tempGender);

            tempPhoto.Source = tempHero.CharacterPortrait;

            JobDescription.SelectAll();
            JobDescription.Selection.Text = ("Network Architect:\nFarthest range in the game with great offense as well.");
        }
        private void SystemsAnalystButton_Click(object sender, RoutedEventArgs e)
        {
            tempJobRole = "Systems Analyst";
            SoftwareEngineerButton.Style = blank;
            SupportEngineerButton.Style = blank;
            SystemsAnalystButton.Style = red;
            NetworkArchitectButton.Style = blank;
            InformationSecurityButton.Style = blank;

            tempHero = new SystemsAnalyst(tempName, tempGender);

            tempPhoto.Source = tempHero.CharacterPortrait;

            JobDescription.SelectAll();
            JobDescription.Selection.Text = ("Systems Analyst:\nModerate range and damage. This hero can attack groups of enemies.");
        }
        private void SupportEngineerButton_Click(object sender, RoutedEventArgs e)
        {
            tempJobRole = "Support Engineer";
            SoftwareEngineerButton.Style = blank;
            SupportEngineerButton.Style = red;
            SystemsAnalystButton.Style = blank;
            NetworkArchitectButton.Style = blank;
            InformationSecurityButton.Style = blank;

            tempHero = new SupportEngineer(tempName, tempGender);

            tempPhoto.Source = tempHero.CharacterPortrait;

            JobDescription.SelectAll();
            JobDescription.Selection.Text = ("Support Engineer:\nHolds moderate stats. This hero sacrifices offense for a more supportive role.");
        }
        private void SoftwareEngineerButton_Click(object sender, RoutedEventArgs e)
        {
            tempJobRole = "Software Engineer";
            SoftwareEngineerButton.Style = red;
            SupportEngineerButton.Style = blank;
            SystemsAnalystButton.Style = blank;
            NetworkArchitectButton.Style = blank;
            InformationSecurityButton.Style = blank;

            tempHero = new SoftwareEngineer(tempName, tempGender);

            tempPhoto.Source = tempHero.CharacterPortrait;

            JobDescription.SelectAll();
            JobDescription.Selection.Text = ("Software Engineer:\nThey have the highest health and defense in the game." +
                                        "They have the slowest movement in the game.");
        }
        private void FemaleButton_Click(object sender, RoutedEventArgs e)
        {
            tempGender = false;
            MaleButton.Style = blank;
            FemaleButton.Style = red;

            switch (tempJobRole)
            {
                case "Software Engineer":
                    {
                        tempHero = new SoftwareEngineer(tempName, tempGender);
                        break;
                    }
                case "Support Engineer":
                    {
                        tempHero = new SupportEngineer(tempName, tempGender);

                        break;
                    }
                case "Systems Analyst":
                    {
                        tempHero = new SystemsAnalyst(tempName, tempGender);

                        break;
                    }
                case "Network Architect":
                    {
                        tempHero = new NetworkArchitect(tempName, tempGender);

                        break;
                    }
                case "Information Security":
                    {
                        tempHero = new InformationSecurity(tempName, tempGender);
                        break;
                    }
                default:
                    {
                        break;
                    }

            }
            tempPhoto.Source = tempHero.CharacterPortrait;
        }
        private void IndividualCharacter()
        {
            BlackOut.Visibility = Visibility.Visible;
            CustomizeWindowGrid.Visibility = Visibility.Visible;

            tempName = NameBox.Text = "";
            tempGender = true;
            tempJobRole = "Software Engineer";
            tempHero = new SoftwareEngineer(tempName, tempGender);

            tempPhoto.Source = tempHero.CharacterPortrait;

            MaleButton.Style = red;
            FemaleButton.Style = blank;

            SoftwareEngineerButton.Style = red;
            SupportEngineerButton.Style = blank;
            SystemsAnalystButton.Style = blank;
            NetworkArchitectButton.Style = blank;
            InformationSecurityButton.Style = blank;

            JobDescription.SelectAll();
            JobDescription.Selection.Text = ("Software Engineer:\nThey have the highest health and defense in the game." +
                                        "They have the slowest movement in the game.");
        }