Exemplo n.º 1
0
 public override void touchedBy(Entity entity)
 {
     if (entity is Player)
     {
         entity.hurt(this, 3, dir);
     }
 }
Exemplo n.º 2
0
        private void hurt(int x0, int y0, int x1, int y1)
        {
            List <Entity> entities = level.getEntities(x0, y0, x1, y1);

            for (int i = 0; i < entities.size(); i++)
            {
                Entity e = entities.get(i);
                if (e != this)
                {
                    e.hurt(this, getAttackDamage(e), attackDir);
                }
            }
        }
Exemplo n.º 3
0
        public override void tick()
        {
            time++;
            if (time >= lifeTime)
            {
                remove();
                return;
            }
            xx += xa;
            yy += ya;
            x   = (int)xx;
            y   = (int)yy;
            List <Entity> toHit = level.getEntities(x, y, x, y);

            for (int i = 0; i < toHit.size(); i++)
            {
                Entity e = toHit.get(i);
                if (e is Mob && !(e is AirWizard))
                {
                    e.hurt(owner, 1, ((Mob)e).dir ^ 1);
                }
            }
        }
Exemplo n.º 4
0
 public override void touchedBy(Entity entity)
 {
     if (entity is Player)
     {
         entity.hurt(this, 3, dir);
     }
 }
Exemplo n.º 5
0
 public override void bumpedInto(Level level, int x, int y, Entity entity)
 {
     entity.hurt(this, x, y, 3);
 }