(dialogNode)
| 44 | } |
| 45 | |
| 46 | parseDialogNode (dialogNode) { |
| 47 | const commands = [] |
| 48 | // Take a good guess at setting the camera to a reasonable default |
| 49 | // if it hasn't been set. We only set defaults for a zoom of 2. |
| 50 | if (this.lastCameraMove.zoom !== 2) { |
| 51 | return commands |
| 52 | } |
| 53 | if (this.lastCameraMove.pos.x !== 0 || this.lastCameraMove.pos.y !== 0) { |
| 54 | return commands |
| 55 | } |
| 56 | const speaker = getSpeaker(dialogNode) |
| 57 | if (speaker === 'left') { |
| 58 | commands.push(this.zoomToCommand(LEFT_SPEAKER_CAMERA_POS, 2)) |
| 59 | } else if (speaker === 'right') { |
| 60 | commands.push(this.zoomToCommand(RIGHT_SPEAKER_CAMERA_POS, 2)) |
| 61 | } |
| 62 | return commands |
| 63 | } |
| 64 | |
| 65 | destroy () { |
| 66 | this.camera.destroy() |
nothing calls this directly
no test coverage detected