Exemplo n.º 1
0
 public void BulletsCollision(EntityManager E2)
 {
     foreach (Entity e in entities)
     {
         foreach (Entity e2 in E2.Entities)
         {
                 e.BulletCollision(e2);
         }
     }
 }
Exemplo n.º 2
0
 public void EntityCollision(EntityManager E2)
 { 
     foreach(Entity e in entities)
     {
         foreach(Entity e2 in E2.Entities)
         {
             if (e.Rect.Intersects(e2.Rect))
                 e.OnCollision(e2);
         }
     }
 }
Exemplo n.º 3
0
 public override void LoadContent(ContentManager content, InputManager input)
 {
     base.LoadContent(content, input);
     player = new EntityManager();
     enemies = new EntityManager();
     map = new Map();
     font = content.Load<SpriteFont>("Font1");
     map.LoadContent(content, map, "Map1");
     player.LoadContent("Player", content, "Load/Player.k", "", input);
     enemies.LoadContent("Enemy", content, "Load/Enemies.k", "Level1", input);
     illusions = content.Load<Song>("Audio/Illusions");
     MediaPlayer.Volume = 0.3f;
     MediaPlayer.IsRepeating = true;
 }