示例#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();
  }
示例#2
0
  public void redo() {
    layer.addSprite(sprite);
    sprite.isSelected = false;

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

    map.flagModified();
  }