Package game.entity

Examples of game.entity.Entity


      }
      t.tick();
    }

    for (int i = 0; i < entities.size(); i++) {
      Entity e = entities.get(i);
      for (Entity e2 : doCollision(e)) {
        Game.debug(Game.DebugLevel.INFO, "Collision of \""
            + e.getClass().getName() + "\" with \""
            + e2.getClass().getName() + "\"");
        e.onCollide(e2);
      }
    }
  }
View Full Code Here


  }

  public Entity[] doCollision(Entity e) {
    List<Entity> ents = new ArrayList<Entity>();
    for (int j = 0; j < entities.size(); j++) {
      Entity e1 = entities.get(j);
      if (e != e1 && e.doesCollideWith(e1)) {
        e.onCollide(e1);
      }
    }
    Entity[] res = new Entity[ents.size()];
View Full Code Here

TOP

Related Classes of game.entity.Entity

Copyright © 2018 www.massapicom. 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.