Package aitgame.tilegame.sprites

Examples of aitgame.tilegame.sprites.Creature


    this.renderer = renderer;

    Iterator<Sprite> iCollisionAndUpdate = collisionAndUpdate.iterator();
   
    while (iCollisionAndUpdate.hasNext()) {
      Creature person = (Creature) iCollisionAndUpdate.next();
     
      if(!checkPeopleCollision(person, elapsedTime, collisionAndUpdate.iterator(),
          iOnlyCollision.iterator())){
        checkTileCollision(person, elapsedTime);
      }

      person.update(elapsedTime);
     
      //Looks for people and objects that can be contacted.
      person.removeContacts();
      checkContactCollision(person, elapsedTime, collisionAndUpdate.iterator(),
          iOnlyCollision.iterator(), itemSprites.iterator());
    }
  } 
View Full Code Here


  /**
  * Checks collision on peoples and other objects that can move.
  */
  private boolean checkPeopleCollision(Creature person, long elapsedTime,
      Iterator<Sprite> iCollisionAndUpdate, Iterator<Sprite> iOnlyCollision) {
    Creature creature;
    boolean collision = false;
   
    //check for collision in CollisionAndUpdate-list.
    while (iCollisionAndUpdate.hasNext()) {
      creature = (Creature) iCollisionAndUpdate.next();
View Full Code Here

  /**
  * Checks to see if objects has contact with each other.
  */
  private void checkContactCollision(Creature person, long elapsedTime, Iterator<Sprite> iCollisionAndUpdate,
      Iterator<Sprite> iOnlyCollision, Iterator<Sprite> itemSprites) {
    Creature creature;
   
    //check for collision in CollisionAndUpdate-list.
    while (iCollisionAndUpdate.hasNext()) {
      creature = (Creature) iCollisionAndUpdate.next();

View Full Code Here

TOP

Related Classes of aitgame.tilegame.sprites.Creature

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.