Exemplo n.º 1
0
 private void HandleDamage(DrawablePhysicsObject crate)
 {
     if (crate.Position.X > player.Position.X && crate.Position.X < player.Position.X + player.Rectangle.Width && crate.Position.Y <= player.Position.Y)
     {
         hud.DecreaseHealth(50);
     }
 }
Exemplo n.º 2
0
        private void SpawnCrate(float x)
        {
            DrawablePhysicsObject crate;

            crate          = new DrawablePhysicsObject(world, new Vector2(50.0f, 50.0f), false);
            crate.Position = new Vector2(x, 1);
            crate.Load(crateTexture);

            cratesAndBricks.Add(crate);
        }
Exemplo n.º 3
0
        private void SpawnBrick()
        {
            DrawablePhysicsObject brick;

            brick          = new DrawablePhysicsObject(world, new Vector2(19.0f, 14.0f), false);
            brick.Position = new Vector2(random.Next(mapWidth), 1);
            brick.Load(brickTexture);

            cratesAndBricks.Add(brick);
        }
Exemplo n.º 4
0
        private void SpawnCrate(float x)
        {
            DrawablePhysicsObject crate;
            crate = new DrawablePhysicsObject(world, new Vector2(50.0f, 50.0f), false);
            crate.Position = new Vector2(x, 1);
            crate.Load(crateTexture);

            cratesAndBricks.Add(crate);
        }
Exemplo n.º 5
0
        private void SpawnBrick()
        {
            DrawablePhysicsObject brick;
            brick = new DrawablePhysicsObject(world, new Vector2(19.0f, 14.0f), false);
            brick.Position = new Vector2(random.Next(mapWidth), 1);
            brick.Load(brickTexture);

            cratesAndBricks.Add(brick);
        }
Exemplo n.º 6
0
 private void HandleDamage(DrawablePhysicsObject crate)
 {
     if (crate.Position.X > player.Position.X && crate.Position.X < player.Position.X + player.Rectangle.Width && crate.Position.Y <= player.Position.Y)
         hud.DecreaseHealth(50);
 }