(x, y, width, height)
| 20 | } |
| 21 | |
| 22 | function createMockGameObject (x, y, width, height) |
| 23 | { |
| 24 | x = (x === undefined) ? 0 : x; |
| 25 | y = (y === undefined) ? 0 : y; |
| 26 | width = (width === undefined) ? 64 : width; |
| 27 | height = (height === undefined) ? 64 : height; |
| 28 | |
| 29 | return { |
| 30 | x: x, |
| 31 | y: y, |
| 32 | originX: 0, |
| 33 | originY: 0, |
| 34 | displayWidth: width, |
| 35 | displayHeight: height, |
| 36 | hasTransformComponent: true, |
| 37 | setPosition: function (px, py) |
| 38 | { |
| 39 | this.x = px; |
| 40 | this.y = py; |
| 41 | }, |
| 42 | getTopLeft: function (out) |
| 43 | { |
| 44 | out.x = this.x; |
| 45 | out.y = this.y; |
| 46 | return out; |
| 47 | } |
| 48 | }; |
| 49 | } |
| 50 | |
| 51 | describe('StaticBody', function () |
| 52 | { |
no outgoing calls
no test coverage detected
searching dependent graphs…