Beispiel #1
0
        public static void DrawInimigosSala3()
        {
            //enemy2 sala 2
            e25 = new Enemy2(new Vector2(3156, 400));
            e26 = new Enemy2(new Vector2(3276, 400));
            e27 = new Enemy2(new Vector2(3898, 400));
            entities.Add(e25);
            entities.Add(e26);
            entities.Add(e27);

            e13 = new Enemy1(new Vector2(3215, 100));
            e14 = new Enemy1(new Vector2(3250, 125));
            e15 = new Enemy1(new Vector2(3692, 125));
            e16 = new Enemy1(new Vector2(4450, 125));
            entities.Add(e13);
            entities.Add(e14);
            entities.Add(e15);
            entities.Add(e16);

            d3 = new Door(new Vector2(4950, 368));
            entities.Add(d3);

            eg1 = new ExitGame(new Vector2(5108, 368));
            entities.Add(eg1);
        }
Beispiel #2
0
        public static void DrawInimigosSala1()
        {
            //Doors
            d1 = new Door(new Vector2(2430, 209));

            entities.Add(d1);



            //PowerUP
            pu1 = new PowerUp(new Vector2(465, 290));
            entities.Add(pu1);

            //Enemy2 sala 1
            e21 = new Enemy2(new Vector2(935, 80));
            e22 = new Enemy2(new Vector2(1132, 81));
            e23 = new Enemy2(new Vector2(2185, 400));
            entities.Add(e21);
            entities.Add(e22);
            entities.Add(e23);


            //Enemy1 sala 1
            e11 = new Enemy1(new Vector2(1490, 65));
            e12 = new Enemy1(new Vector2(1646, 125));
            entities.Add(e11);
            entities.Add(e12);
        }
Beispiel #3
0
 public static void DrawInimigosSala2()
 {
     d2 = new Door(new Vector2(2942, 209));
     entities.Add(d2);
     //enemy2 sala 2
     e24 = new Enemy2(new Vector2(2686, 175));
     entities.Add(e24);
 }
Beispiel #4
0
        public override void CollisionDetected(Entity other)
        {
            if (other is Enemy2)
            {
                Enemy2 c = (Enemy2)other;
                c.SetHealth(damage);
                Game1.entities.Remove(this);
                if (c.GetHealth() <= 0)
                {
                    Game1.entities.Remove(other);
                }
            }

            if (other is Enemy1)
            {
                Enemy1 c = (Enemy1)other;
                c.SetHealth(damage);
                Game1.entities.Remove(this);
                if (c.GetHealth() <= 0)
                {
                    Game1.entities.Remove(other);
                }
            }

            if (other is Door)
            {
                Door d = (Door)other;
                d.SetHealth(damage);
                Game1.entities.Remove(this);
            }

            if (other is Map)
            {
                Game1.entities.Remove(this);
            }
        }