Package fr.umlv.escapeir.model.element

Examples of fr.umlv.escapeir.model.element.Bullet.hit()


     */
    if(contact.getFixtureA().getFilterData().categoryBits == Category.PLAYER_BULLET.getValue() && contact.getFixtureB().getFilterData().categoryBits == Category.ENNEMY.getValue()){
      AbstractShip ship = (AbstractShip) contact.getFixtureB().getBody().getUserData();
      Bullet bullet = (Bullet) contact.getFixtureA().getBody().getUserData();
      ship.isHit(bullet);
      bullet.hit();
    }
    if(contact.getFixtureB().getFilterData().categoryBits == Category.PLAYER_BULLET.getValue() && contact.getFixtureA().getFilterData().categoryBits == Category.ENNEMY.getValue()){
      AbstractShip ship = (AbstractShip) contact.getFixtureA().getBody().getUserData();
      Bullet bullet = (Bullet) contact.getFixtureB().getBody().getUserData();
      ship.isHit(bullet);
View Full Code Here


    }
    if(contact.getFixtureB().getFilterData().categoryBits == Category.PLAYER_BULLET.getValue() && contact.getFixtureA().getFilterData().categoryBits == Category.ENNEMY.getValue()){
      AbstractShip ship = (AbstractShip) contact.getFixtureA().getBody().getUserData();
      Bullet bullet = (Bullet) contact.getFixtureB().getBody().getUserData();
      ship.isHit(bullet);
      bullet.hit();
    }
   
   
    /**
     * Test if ennemy bullet hit the player
View Full Code Here

     */
    if(contact.getFixtureB().getFilterData().categoryBits == Category.ENNEMY_BULLET.getValue() && contact.getFixtureA().getFilterData().categoryBits == Category.PLAYER.getValue()){
      AbstractShip ship = (AbstractShip) contact.getFixtureA().getBody().getUserData();
      Bullet bullet = (Bullet) contact.getFixtureB().getBody().getUserData();
      ship.isHit(bullet);
      bullet.hit();
    }
    if(contact.getFixtureB().getFilterData().categoryBits == Category.ENNEMY_BULLET.getValue() && contact.getFixtureA().getFilterData().categoryBits == Category.PLAYER.getValue()){
      AbstractShip ship = (AbstractShip) contact.getFixtureA().getBody().getUserData();
      Bullet bullet = (Bullet) contact.getFixtureB().getBody().getUserData();
      ship.isHit(bullet);
View Full Code Here

    }
    if(contact.getFixtureB().getFilterData().categoryBits == Category.ENNEMY_BULLET.getValue() && contact.getFixtureA().getFilterData().categoryBits == Category.PLAYER.getValue()){
      AbstractShip ship = (AbstractShip) contact.getFixtureA().getBody().getUserData();
      Bullet bullet = (Bullet) contact.getFixtureB().getBody().getUserData();
      ship.isHit(bullet);
      bullet.hit();
    }
   
    /**
     * Test if bullet hit a boss
     */
 
View Full Code Here

     */
    if(contact.getFixtureB().getFilterData().categoryBits == Category.PLAYER_BULLET.getValue() && contact.getFixtureA().getFilterData().categoryBits == Category.BOSS.getValue()){
      AbstractShip ship = (AbstractShip) contact.getFixtureA().getBody().getUserData();
      Bullet bullet = (Bullet) contact.getFixtureB().getBody().getUserData();
      ship.isHit(bullet);
      bullet.hit();
    }
    if(contact.getFixtureB().getFilterData().categoryBits == Category.PLAYER_BULLET.getValue() && contact.getFixtureA().getFilterData().categoryBits == Category.BOSS.getValue()){
      AbstractShip ship = (AbstractShip) contact.getFixtureA().getBody().getUserData();
      Bullet bullet = (Bullet) contact.getFixtureB().getBody().getUserData();
      ship.isHit(bullet);
View Full Code Here

    }
    if(contact.getFixtureB().getFilterData().categoryBits == Category.PLAYER_BULLET.getValue() && contact.getFixtureA().getFilterData().categoryBits == Category.BOSS.getValue()){
      AbstractShip ship = (AbstractShip) contact.getFixtureA().getBody().getUserData();
      Bullet bullet = (Bullet) contact.getFixtureB().getBody().getUserData();
      ship.isHit(bullet);
      bullet.hit();
    }
   
    /**
     * Test if ennemy hit the player
     */
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.