Package framework.spacial

Examples of framework.spacial.PositionComponent.addVector()


    GridLineGenerator.generateLineGrid(grid, gridParent, spacing);
    SquareGenerator.generateSquares(grid, gridParent, spacing);
   
    PositionComponent pos = new PositionComponent(0, 0);
    gridParent.addComponent(pos);
    pos.addVector(new Vector2f(topLeftX, topLeftY));
   
    DotsGenerator.createDots(topLeftX, topLeftY , grid.getDotsWidth() , grid.getDotsHeight() , spacing, gridParent);
  }
 
  public static ArrayList<Player> generatePlayers(int numHumanPlayers, int numAIPlayers){
View Full Code Here


  public void onEvent(Event e) {
    if(e != null && e.getType() == "TimePassed"){
      PositionComponent pos = (PositionComponent) getSiblingByType(PositionComponent.class.getName());
      if(pos != null){
        TimePassedEvent time = (TimePassedEvent) e;
        pos.addVector(this.getVector().scale(time.getDelta()));
      }
    }
  }
 
 
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.