Exemplo n.º 1
0
  /**
   * @param plane
   * @param x
   * @param y
   * @param type
   * @param configId
   * @param orientation
   */
  public void markObject(int plane, int x, int y, int type, int configId, int orientation) {
    int group = GameObjectGroup.getGroupForType(type);
    GameObjectConfig config = GameObjectConfig.forId(configId);
    TraversalMap map = traversalMaps[plane];

    if (group == GameObjectGroup.WALL) {
      if (config.isSolid()) {
        map.markWall(x, y, type, orientation, config.isImpenetrable());
      }
    }

    if (group == GameObjectGroup.GROUP_2) {
      if (config.isSolid()) {
        map.markOccupant(x, y, config.getWidth(), config.getHeight(), config.isImpenetrable());
      }
    }
  }