Package org.sfsoft.jfighter2dx.characters

Examples of org.sfsoft.jfighter2dx.characters.Enemy.hit()


        if (bullet.getRect().overlaps(enemy.getRect())) {
         
          // Si el enemigo no es meteorito ni bala enemiga se explosiona y se elimina
          if ((!enemy.getClass().getSimpleName().equals("Stone")) && (!enemy.getClass().getSimpleName().equals("ShooterBullet"))) {
           
            enemy.hit();
            if (enemy.getLives() == 0) {
              ship.addScore(enemy.getValue());
             
              Explosion explosion = new Explosion(enemy.getX() - Constants.ENEMY_WIDTH, enemy.getY());
              explosions.add(explosion);
View Full Code Here


      for (int i = enemies.size - 1; i >= 0; i--) {
        enemy = enemies.get(i);
       
        if (enemy.getRect().overlaps(ship.getRect())) {
         
          enemy.hit();
          if (enemy.getLives() == 0) {
            ship.addScore(enemy.getValue());
           
            Explosion explosion = new Explosion(enemy.getX(), enemy.getY());
            explosions.add(explosion);
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.