Esempio n. 1
0
 private void Spawn()
 {
     for (int n = 0; n < numberOfAnts; n++)
     {
         FiendeMyra myra = new FiendeMyra(game, spriteSheet);
         myra.Initialize(runningState);
         myra.Position = Position;
         myra.SetExternalRandom(random);
         myra.SetRandomDirection();
         runningState.addObjektLista.Add(myra);
     }
 }
Esempio n. 2
0
        public Level4(Game1 game, Sprite spriteSheet, Random random1)
            : base()
        {
            spelObjektLista = new List<SpelObjekt>();

            for (int n = 0; n < 10; n++)
            {
                FiendeMyra myra = new FiendeMyra(game, spriteSheet);
                myra.Position = new Vector2(random1.Next(870), random1.Next(670));
                myra.SetExternalRandom(random1);
                myra.SetRandomDirection();
                spelObjektLista.Add(myra);
            }

            FiendeMyrEgg egg = new FiendeMyrEgg(game, spriteSheet);
            egg.Position = new Vector2(300, 300);
            spelObjektLista.Add(egg);
        }