()
| 42 | this.destroy(); |
| 43 | } |
| 44 | render() |
| 45 | { |
| 46 | super.render(); |
| 47 | |
| 48 | // draw white circle and ball number |
| 49 | drawCircle(this.pos, .6, WHITE); |
| 50 | const textPos = this.pos.add(vec2(0,-.06)); |
| 51 | if (this.number) |
| 52 | drawText(this.number, textPos, .5, BLACK); |
| 53 | if (this.canHit()) |
| 54 | { |
| 55 | // draw the aim line |
| 56 | const endPos = this.pos.add(this.getHitOffset()); |
| 57 | const width = this.getHitStrength(); |
| 58 | drawLine(this.pos, endPos, width, hsl(0,1,.5,.5), |
| 59 | vec2(), 0, false); |
| 60 | } |
| 61 | } |
| 62 | } |
| 63 | |
| 64 | class Pocket extends Box2dStaticObject |
nothing calls this directly
no test coverage detected