Package battleTank

Examples of battleTank.Crate.move()


      for (Obstacle obs : obstacleList) {
        // This tank will push the crate if the crate is movable
        if (obs instanceof Crate) {
          Crate c = (Crate) obs;
          if (rect.intersects(c.getRectangle())) {
            c.move(tankList.getFirst().getDirection());
          }
        }
        // This tank will push the TNT if the TNT is movable
        if (obs instanceof TNT) {
          TNT c = (TNT) obs;
View Full Code Here


        }
        // This tank will push the TNT if the TNT is movable
        if (obs instanceof TNT) {
          TNT c = (TNT) obs;
          if (rect.intersects(c.getRectangle())) {
            c.move(tankList.getFirst().getDirection());
          }
        }
        // FireRing's can not kill the AI for difficulty purposes
        if (obs instanceof FireRing) {
          FireRing c = (FireRing) obs;
View Full Code Here

      for (Obstacle obs : obstacleList) {
        // The PlayerTank will push the crate if it is movable
        if (obs instanceof Crate) {
          Crate c = (Crate) obs;
          if (rect.intersects(c.getRectangle())) {
            c.move(tankList.getFirst().getDirection());
          }
        }
        // The PlayerTank will push the TNT if it is movable
        if (obs instanceof TNT) {
          TNT c = (TNT) obs;
View Full Code Here

        }
        // The PlayerTank will push the TNT if it is movable
        if (obs instanceof TNT) {
          TNT c = (TNT) obs;
          if (rect.intersects(c.getRectangle())) {
            c.move(tankList.getFirst().getDirection());
          }
        }
        // If the PlayerTank collides with a FireRing it will die
        if (obs instanceof FireRing) {
          FireRing c = (FireRing) obs;
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.