Package com.mlarktar.spacewar.sprites

Examples of com.mlarktar.spacewar.sprites.SpaceItem


    // sees if there are any INCOMMING misiles and fires a
    // laser at them
    Iterator i = items.iterator();
    while (i.hasNext()) {
      SpaceItem si = (SpaceItem) i.next();
      if (si instanceof Misile) {
        Misile misile = (Misile) si;
        if (LaserBeam.inRange(ship, misile) && misile.getOwner() != ship) {
          ship.addRule(this);
          break;
View Full Code Here


    // removes any object that does less than 8 units of hitpoints
    // so it doesnt jump for every misile that it is fired
    Iterator i = items.iterator();
    while (i.hasNext()) {
      SpaceItem si = (SpaceItem) i.next();
      if (si.getHitPoints() < ShipAI.HYPERCOST) {
        i.remove();
      }
      // doesnt hyper if it is about to collide with a weaker
      // ship. :P
      if (si instanceof Ship) {
View Full Code Here

    // sees if there are any INCOMMING misiles and fires a
    // laser at them
    Iterator i = items.iterator();
    while (i.hasNext()) {
      SpaceItem si = (SpaceItem) i.next();
      if (si instanceof Planet) {
        this.planet = (Planet) si;
        break;
      }
    }
View Full Code Here

TOP

Related Classes of com.mlarktar.spacewar.sprites.SpaceItem

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.