Examples of BooleanArray2D


Examples of net.alteiar.beans.map.filter.squaredMap.BooleanArray2D

  public CharacterMapFilter(MapBean map) {
    super(map.getId());
    elementsViews = new HashSet<UniqueID>();
    maxVision = 4;

    filterMap = new BooleanArray2D(map.getWidth(), map.getHeight(),
        VISIBLE_VALUE);

    somethingChange = false;
    refreshVision = true;
  }
View Full Code Here

Examples of net.alteiar.beans.map.filter.squaredMap.BooleanArray2D

    new WaitMultipleBeansListener(ids) {
      @Override
      public void beanReceived() {
        // Create all info given the map
        filterMap = new BooleanArray2D(getMap().getWidth(), getMap()
            .getHeight(), VISIBLE_VALUE);

        // add listener on each element to view
        ArrayList<MapElement> elements = CampaignClient.getInstance()
            .getBeans(elementsViews);
View Full Code Here

Examples of net.alteiar.beans.map.filter.squaredMap.BooleanArray2D

        getMap().getWidth(), getMap().getHeight());
    return ((DataBufferInt) img.getRaster().getDataBuffer()).getData();
  }

  private void refreshFilterImage() {
    BooleanArray2D visionMap = new BooleanArray2D(getMap().getWidth(),
        getMap().getHeight(), HIDE_VALUE);

    ArrayList<MapElement> elements = CampaignClient.getInstance().getBeans(
        elementsViews);

    for (MapElement element : elements) {
      computeVision(visionMap, VISIBLE_VALUE, element.getCenterPosition());
    }

    BufferedImage img = null;
    if (isDm) {
      img = visionMap.buildImage(VISIBLE_COLOR, HIDDEN_DM_COLOR);
    } else {
      img = visionMap.buildImage(VISIBLE_COLOR, HIDDEN_PLAYER_COLOR);
    }

    BufferedImage oldValue = this.filterImage;
    if (filterImage != null) {
      synchronized (filterImage) {
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.