Example #1
0
        public void MaakVijanden(int AantalBewegend, int AantalStilstaand)
        {
            string[] Lichaam = { "../../Resources/Tjeerd.png", "../../Resources/Thomas.png", "../../Resources/Eltjo.png" };

            for (int i = 0; i < AantalBewegend; i++)
            {
                Vijand           Vijand           = new Vijand(Lichaam[Willekeurig.Next(0, 3)], Vijand.VijandType.Bewegend, Willekeurig.Next(0, 500), Willekeurig.Next(0, 300));
                VijandController vijandcontroller = new VijandController(Vijand);
                SchoolEsc.Controller.VijandController.Vijanden.Add(vijandcontroller);
            }

            for (int i = 0; i < AantalStilstaand; i++)
            {
                Vijand           Vijand           = new Vijand(Lichaam[Willekeurig.Next(0, 3)], Vijand.VijandType.Stilstaand, Willekeurig.Next(0, 500), Willekeurig.Next(0, 300));
                VijandController vijandcontroller = new VijandController(Vijand);
                SchoolEsc.Controller.VijandController.Vijanden.Add(vijandcontroller);
            }
        }
Example #2
0
 private void OnTimedEvent(object source, ElapsedEventArgs e)
 {
     //Verplaatst vijanden met 1 pixel.
     VijandController.VerplaatsVijand(1);
 }