Ejemplo n.º 1
0
        public override void addEntity(Entity entity)
        {
            base.addEntity(entity);
            if (!filled && (entity is GhostEntity || entity is GhostBossEntity)) {
                entity.remove();
                filled = true;
                blocksMotion = false;
                sprite.removed = true;

                for (int i = 0; i < 8; i++) {
                    RubbleSprite s = new RubbleSprite();
                    s.col = this.sprite.col;
                    addSprite(s);
                }

                if (entity is GhostBossEntity)
                {
                    level.addEntity(new KeyEntity(x, y));
                    Sound.bosskill.play();
                }
                else
                {
                    Sound.altar.play();
                }
            }
        }
Ejemplo n.º 2
0
 public override void removeEntity(Entity entity)
 {
     base.removeEntity(entity);
     if (entity is Player) {
         wait = false;
     }
 }
Ejemplo n.º 3
0
 public override bool blocks(Entity entity)
 {
     if (entity is Player) return false;
     if (entity is Bullet) return false;
     if (entity is EyeBossEntity) return false;
     if (entity is EyeEntity) return false;
     return true;
 }
Ejemplo n.º 4
0
 public override bool blocks(Entity entity)
 {
     double openLimit = 7 / 8.0;
     if (openness >= openLimit && entity is Player) return blocksMotion;
     if (openness >= openLimit && entity is Bullet) return blocksMotion;
     if (openness >= openLimit && entity is OgreEntity) return blocksMotion;
     return true;
 }
Ejemplo n.º 5
0
 public override void addEntity(Entity entity)
 {
     base.addEntity(entity);
     Player player = entity as Player;
     if (null != player)
     {
         player.win();
     }
 }
Ejemplo n.º 6
0
        public override void addEntity(Entity entity)
        {
            base.addEntity(entity);

            if (!wait && entity is Player) {
                level.switchLevel(id);
                Sound.ladder.play();
            }
        }
Ejemplo n.º 7
0
 public override bool blocks(Entity entity)
 {
     Player player = entity as Player;
     if (null != player)
     {
         if (player.getSelectedItem() == Item.flippers) return false;
     }
     if (entity is Bullet) return false;
     return blocksMotion;
 }
Ejemplo n.º 8
0
 public override void addEntity(Entity entity)
 {
     base.addEntity(entity);
     if (!filled && entity is BoulderEntity)
     {
         entity.remove();
         filled = true;
         blocksMotion = false;
         addSprite(new Sprite(0, 0, 0, 8 + 2, BoulderEntity.COLOR));
         Sound.thud.play();
     }
 }
Ejemplo n.º 9
0
        public override void addEntity(Entity entity)
        {
            base.addEntity(entity);
            Player player = entity as Player;
            if (!taken && null != player)
            {
                sprite.removed = true;
                taken = true;
                blocksMotion = false;
                player.loot++;
                Sound.pickup.play();

            }
        }
Ejemplo n.º 10
0
 public override bool blocks(Entity entity)
 {
     if (entity is BoulderEntity) return false;
     return blocksMotion;
 }
Ejemplo n.º 11
0
 public override double getFloorHeight(Entity e)
 {
     if (pressed) return -0.02;
     else return 0.02;
 }
Ejemplo n.º 12
0
 public override bool blocks(Entity entity)
 {
     if (entity is Player) return false;
     return blocksMotion;
 }
Ejemplo n.º 13
0
 public override bool blocks(Entity entity)
 {
     return blocksMotion;
 }
Ejemplo n.º 14
0
 public override double getFloorHeight(Entity e)
 {
     return -0.5;
 }