Example #1
0
  public DropSpriteEdit(LevelMap map, SpriteType spriteType, Point loc) {
    super();
    this.map = map;
    this.spriteType = spriteType;
    this.loc = loc;
    this.layer = map.selectedLayer;

    sprite = layer.dropSpriteType(spriteType, loc);

    map.flagModified();
  }
Example #2
0
  public void redo() {
    layer.addSprite(sprite);
    sprite.isSelected = false;

    map.flagModified();
  }
Example #3
0
  public void undo() {
    layer.removeSprite(sprite);
    sprite.isSelected = false;

    map.flagModified();
  }