Examples of NEUnit


Examples of de.nameless.gameEngine.gameObjects.NEUnit

    if (goj instanceof NEField) {
      gameInput.fieldHit((NEField) goj);     
    }
   
    if (goj instanceof NEUnit) {
      NEUnit unit = (NEUnit) goj;
      if(unit.getSquare() != null) this.processLMBHitObject(unit.getSquare());
    }
   
  }
View Full Code Here

Examples of de.nameless.gameEngine.gameObjects.NEUnit

   * @return
   */
  public NEUnit getUnitByID(long id){   
    for(NEGameObject  o :GaOJ.getAll()){
      if (o instanceof NEUnit) {
        NEUnit u = (NEUnit) o;
        if(u.getUnitId()==id)return u;
      }
    }   
    return null;   
  }
View Full Code Here

Examples of de.nameless.gameEngine.gameObjects.NEUnit

  }
 
  public void removeTurnLabels(){
    for(NEGameObject  o :GaOJ.getAll()){
      if (o instanceof NEUnit) {
        NEUnit u = (NEUnit) o;
        u.releaseMovedLable();
      }
    } 
  }
View Full Code Here

Examples of de.nameless.gameEngine.gameObjects.NEUnit

  }


  @Override
  public void DoTransaktion(NEgameServer game) {
    NEUnit u = game.getUnitByID(unitid);   
    u.moveTo(game.getMap().get(toX, toY));   
  }
View Full Code Here

Examples of de.nameless.gameEngine.gameObjects.NEUnit

    }
  }

  @Override
  public void DoTransaktion(NEgameServer game) {
    NEUnit u  = game.getUnitByID(unitid);
    NEField targetField = game.getFieldByXY(way.lastElement().x, way.lastElement().y);
   
    if (u.getSquare()!=targetField) {
      oldPos = new Point((int) u.getSquare().cordX, (int) u.getSquare().cordY)
      System.out.println(oldPos);
      Vector<NEField> Fway = new Vector<NEField>();
      for (java.awt.Point p : way) {
        Fway.add(game.getMap().get(p.x, p.y));
      }
      u.followPath(Fway);
      u.setMovedLable();
    }
    done = true;
   
  }
View Full Code Here

Examples of de.nameless.gameEngine.gameObjects.NEUnit

  @Override
  public void UndoTransaction(NEgameServer game) {
    if(done){
     
      NEField sourceField = game.getFieldByXY(oldPos.x,oldPos.y);
      NEUnit u  = game.getUnitByID(unitid);
      System.out.println(sourceField);
      u.jumpTo(sourceField);
      u.releaseMovedLable();   
      done = false;
    }   
  }
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.