Esempio n. 1
0
        private void SpawnEnemies()
        {
            var BattleCruiser = System.Reflection.Assembly.GetExecutingAssembly().Location + "\\..\\..\\..\\Resources\\Battlecruiser.png";
            var BattleStar    = System.Reflection.Assembly.GetExecutingAssembly().Location + "\\..\\..\\..\\Resources\\Battlestar.PNG";
            var Raider        = System.Reflection.Assembly.GetExecutingAssembly().Location + "\\..\\..\\..\\Resources\\Raider.png";

            GameCharacters.Quacklon Quack = new GameCharacters.Quacklon();
            Quack.SetQuacklonDefaultPos();
            Quack.SetShipType();
            if (Quack.EnemyShipType == "Quacklon Battlecruiser")
            {
                int id = Quackers.Count + 1;
                Quack.ID = "Quack" + id;
                Quackers.Add(Quack.ID, Quack);
                DrawEnemy(BattleCruiser, 0, 0);
            }

            else if (Quack.EnemyShipType == "Quacklon Battlestar")
            {
                int id = Quackers.Count + 1;
                Quack.ID = "Quack" + id;
                Quackers.Add(Quack.ID, Quack);
                DrawEnemy(BattleStar, 0, 0);
            }

            else if (Quack.EnemyShipType == "Quacklon Raider")
            {
                int id = Quackers.Count + 1;
                Quack.ID = "Quack" + id;
                Quackers.Add(Quack.ID, Quack);
                DrawEnemy(Raider, 0, 0);
            }
        }
Esempio n. 2
0
        private void DisplayEnemy(GameCharacters.Quacklon Quack)
        {
            var BattleCruiser = System.Reflection.Assembly.GetExecutingAssembly().Location + "\\..\\..\\..\\Resources\\Battlecruiser.png";
            var BattleStar    = System.Reflection.Assembly.GetExecutingAssembly().Location + "\\..\\..\\..\\Resources\\Battlestar.PNG";
            var Raider        = System.Reflection.Assembly.GetExecutingAssembly().Location + "\\..\\..\\..\\Resources\\Raider.png";


            if (Quack.EnemyShipType == "Quacklon Battlecruiser")
            {
                DrawEnemy(BattleCruiser, Quack.CurrentLocation.XCoordinate, Quack.CurrentLocation.YCoordinate);
            }

            else if (Quack.EnemyShipType == "Quacklon Battlestar")
            {
                DrawEnemy(BattleStar, Quack.CurrentLocation.XCoordinate, Quack.CurrentLocation.YCoordinate);
            }

            else if (Quack.EnemyShipType == "Quacklon Raider")
            {
                DrawEnemy(Raider, Quack.CurrentLocation.XCoordinate, Quack.CurrentLocation.YCoordinate);
            }
        }