Examples of Collidable


Examples of edu.ups.gamedev.scene.Collidable

   
    TankGame.GAME.unlock();
  }

  private void handleFireable(Node node, Node other) {
    Collidable parent = Tools.getCollidableParent(node);
    if (parent instanceof Fireable) {
      ((Fireable) parent).detonate(other);
    }
  }
View Full Code Here

Examples of game.core.Collidable

   
   
   
    for (int i = 0; i < colissionMap.size(); i++) {

      Collidable colissionI = colissionMap.get(i);
     
      int playerX = (int) Levels.test.getX();
      int playerY = (int) Levels.test.getY();
      int playerSizeX = (int) Levels.test.getTexture().getWidth();
      int playerSizeY = (int) Levels.test.getTexture().getHeight();
View Full Code Here

Examples of interfaces.Collidable

    // Kollision des Akteurs mit der Tilemap

    // Tile links oben
    int x = getHitbox().newX;
    int y = getHitbox().newY;
    Collidable tile = tm.getTilefromCoord(x, y);
    synchronized (tile) {
      tile.getHitbox().setLocation(x - x % tm.getTilesizeX(),  y - y % tm.getTilesizeY());
      if (tile.isBlocked()) {
        tile.handleCollisionWith(this);
      }     
    }


    // Tile rechts oben
    x = getHitbox().newX + getHitbox().width - 1;
    y = getHitbox().newY;
    tile = tm.getTilefromCoord(x, y);
    synchronized (tile) {
      tile.getHitbox().setLocation(x - x % tm.getTilesizeX(),  y - y % tm.getTilesizeY());
      if (tile.isBlocked()) {
        tile.handleCollisionWith(this);
      }     
    }


    // Tile links
    x = getHitbox().newX;
    y = getHitbox().newY + getHitbox().height / 2;
    tile = tm.getTilefromCoord(x, y);
    synchronized (tile) {
      tile.getHitbox().setLocation(x - x % tm.getTilesizeX(),  y - y % tm.getTilesizeY());
      if (tile.isBlocked()) {
        tile.handleCollisionWith(this);
      }     
    }

    // Tile rechts
    x = getHitbox().newX + getHitbox().width - 1;
    y = getHitbox().newY + getHitbox().height / 2;
    tile = tm.getTilefromCoord(x, y);
    synchronized (tile) {
      tile.getHitbox().setLocation(x - x % tm.getTilesizeX(),  y - y % tm.getTilesizeY());
      if (tile.isBlocked()) {
        tile.handleCollisionWith(this);
      }     
    }


    // Tile links unten
    x = getHitbox().newX;
    y = getHitbox().newY + getHitbox().height;
    tile = tm.getTilefromCoord(x, y);
    synchronized (tile) {
      tile.getHitbox().setLocation(x - x % tm.getTilesizeX(),  y - y % tm.getTilesizeY());
      if (tile.isBlocked()) {
        tile.handleCollisionWith(this);
      }     
    }


    // Tile rechts unten
    x = getHitbox().newX + getHitbox().width - 1;
    y = getHitbox().newY + getHitbox().height;
    tile = tm.getTilefromCoord(x, y);
    synchronized (tile) {
      tile.getHitbox().setLocation(x - x % tm.getTilesizeX(),  y - y % tm.getTilesizeY());
      if (tile.isBlocked()) {
        tile.handleCollisionWith(this);
      }     
    }
   
    ArrayList<Entity> updatelist = InGame.getInstance().getUpdateList();
    ArrayList<Entity> localupdatelist = new ArrayList<Entity>();
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.