RunPreparation is called only once, and is called automatically when calling Open It is only here for benchmarking in combination with OpenHeadlessNoRun
(defaultScene Scene)
| 84 | // RunPreparation is called only once, and is called automatically when calling Open |
| 85 | // It is only here for benchmarking in combination with OpenHeadlessNoRun |
| 86 | func RunPreparation(defaultScene Scene) { |
| 87 | windowWidth = float32(opts.MobileWidth) |
| 88 | canvasWidth = float32(opts.MobileWidth) |
| 89 | windowHeight = float32(opts.MobileHeight) |
| 90 | canvasHeight = float32(opts.MobileHeight) |
| 91 | ResizeXOffset = gameWidth - canvasWidth |
| 92 | ResizeYOffset = gameHeight - canvasHeight |
| 93 | |
| 94 | Gl.Viewport(0, 0, opts.MobileWidth, opts.MobileHeight) |
| 95 | |
| 96 | Time = NewClock() |
| 97 | SetScene(defaultScene, false) |
| 98 | } |
| 99 | |
| 100 | // RunIteration runs every time android calls to update the screen |
| 101 | func RunIteration() { |
no test coverage detected