(dt: number)
| 57 | } |
| 58 | |
| 59 | override update(dt: number): void { |
| 60 | this.duration -= dt; |
| 61 | if (this.duration <= 0) { |
| 62 | this.duration = 0; |
| 63 | this.camera.offset.setZero(); |
| 64 | this.isComplete = true; |
| 65 | if (typeof this.onComplete === "function") { |
| 66 | this.onComplete(); |
| 67 | } |
| 68 | } else { |
| 69 | const axis = this.camera.AXIS; |
| 70 | if (this.axis === axis.BOTH || this.axis === axis.HORIZONTAL) { |
| 71 | this.camera.offset.x = (Math.random() - 0.5) * this.intensity; |
| 72 | } |
| 73 | if (this.axis === axis.BOTH || this.axis === axis.VERTICAL) { |
| 74 | this.camera.offset.y = (Math.random() - 0.5) * this.intensity; |
| 75 | } |
| 76 | } |
| 77 | } |
| 78 | |
| 79 | override destroy(): void { |
| 80 | this.camera.offset.setZero(); |
nothing calls this directly
no test coverage detected