Package tiled.mapeditor.undo

Examples of tiled.mapeditor.undo.MoveObjectsEdit


      MapObject mapObject = iterator.next();
      Point initialPoint = initialObjLocations.get(mapObject);
      mapObject.setLocation(initialPoint.x + translation.x, initialPoint.y + translation.y);
      movedObjects[i++] = mapObject;
    }
    MoveObjectsEdit moveEdit = new MoveObjectsEdit(movedObjects,translation);
    moveEdit.setSelectionLayer(this);
    return moveEdit;
   
  }
View Full Code Here


    } else if (currentPointerState == PS_MOVEOBJ) {
      if (initialObjectLocation != null && currentObject != null) {
        Point translation = new Point(currentObject.getX() - initialObjectLocation.x, currentObject.getY() - initialObjectLocation.y);
        if (layer instanceof ObjectGroup && currentObject != null
            && (translation.x != 0 || translation.y != 0)) {
           addEdit(new MoveObjectsEdit(currentObject, translation));
           initialObjectLocation = null;
        }
      }
    }
View Full Code Here

TOP

Related Classes of tiled.mapeditor.undo.MoveObjectsEdit

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.