(gameObject, hitArea, hitAreaCallback)
| 26 | * @return {Phaser.Types.Input.InteractiveObject} The new Interactive Object. |
| 27 | */ |
| 28 | var CreateInteractiveObject = function (gameObject, hitArea, hitAreaCallback) |
| 29 | { |
| 30 | return { |
| 31 | |
| 32 | gameObject: gameObject, |
| 33 | |
| 34 | enabled: true, |
| 35 | draggable: false, |
| 36 | dropZone: false, |
| 37 | cursor: false, |
| 38 | |
| 39 | target: null, |
| 40 | |
| 41 | camera: null, |
| 42 | |
| 43 | hitArea: hitArea, |
| 44 | hitAreaCallback: hitAreaCallback, |
| 45 | hitAreaDebug: null, |
| 46 | |
| 47 | // Has the dev specified their own shape, or is this bound to the texture size? |
| 48 | customHitArea: false, |
| 49 | |
| 50 | localX: 0, |
| 51 | localY: 0, |
| 52 | |
| 53 | // 0 = Not being dragged |
| 54 | // 1 = Being checked for dragging |
| 55 | // 2 = Being dragged |
| 56 | dragState: 0, |
| 57 | |
| 58 | dragStartX: 0, |
| 59 | dragStartY: 0, |
| 60 | dragStartXGlobal: 0, |
| 61 | dragStartYGlobal: 0, |
| 62 | dragStartCamera: null, |
| 63 | |
| 64 | dragX: 0, |
| 65 | dragY: 0 |
| 66 | |
| 67 | }; |
| 68 | }; |
| 69 | |
| 70 | module.exports = CreateInteractiveObject; |
no outgoing calls
no test coverage detected
searching dependent graphs…