Jump to content

DropZone


slick
 Share

Recommended Posts

//  A drop zone
    var zone = this.add.zone(500, 300, 300, 300).setDropZone();

    //  Just a visual display of the drop zone
    var graphics = this.add.graphics();
    graphics.lineStyle(2, 0xffff00);
    graphics.strokeRect(zone.x + zone.input.hitArea.x, zone.y + zone.input.hitArea.y, zone.input.hitArea.width, zone.input.hitArea.height);

 

Why not 

graphics.strokeRect(zone.x , zone.y , zone.width, zone.height);

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...