kittykatattack / hexi

Make games the fun way!
MIT License
551 stars 83 forks source link

Hexi and draggable #3

Open sashamirkovic opened 8 years ago

sashamirkovic commented 8 years ago

Is there a way to handle drag start stop events of draggable objects in Hexi? Like this for example.

Additionally, as stated in Tink, dragging changes stacking order of object being dragged, is there a way to avoid changing stacking order of object being dragged?

Also if there is (undraggable) Display Object (DO) above draggable object, clicking on DO and dragging will move draggable object although it was not clicked (this is beacuse in code only draggable objects are checked by hitTestSprite).

kittykatattack commented 8 years ago

Hi!

pixie.draggable.js is much more full-featured than Hexi's much more basic drag-and-drop. But, Hexi sprites are just Pixi sprites! That means you can import and use pixie.draggable.js in any hexi project and it should work as-is.