Package squaresgame

Examples of squaresgame.LineComponent


  }

  private static ParentComponent generateGridLine(int gridX, int gridY, boolean isHorizontal, float spacing, Grid grid){
    ParentComponent lineParent = generateGridLine(spacing*gridX, spacing*gridY, isHorizontal);

    LineComponent lineComp = new LineComponent(isHorizontal ? grid.getHorizontalLine(gridX,gridY) : grid.getVerticalLine(gridX,gridY));
    lineParent.addComponent(lineComp);
   
    lineParent.setLabel(getLineLabel(gridX, gridY, isHorizontal));
    return lineParent;
  }
View Full Code Here


    for(CollisionComponent c:collis.getAllComponentsInContact()){
      inContactWith = c;
    }

    if(inContactWith != null){
      LineComponent lineComp = (LineComponent) inContactWith.getSiblingByType(LineComponent.class.getName());
      EventSystem.getInstance().pushEvent(new PlayerClickedOnLineEvent(lineComp));
    }
  }
View Full Code Here

    }
  }

  private static boolean isSiblingLinePlaced(Component c){
    if(c != null){
      LineComponent lineComp = (LineComponent) c.getSiblingByType(LineComponent.class.getName());
      if(lineComp != null && lineComp.getLine() != null){
        return lineComp.getLine().isPlaced();
      }
    }
    return false;
  }
View Full Code Here

TOP

Related Classes of squaresgame.LineComponent

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.