MCPcopy Create free account
hub / github.com/EngoEngine/engo / RunPreparation

Function RunPreparation

engo_mobile_bind.go:86–98  ·  view source on GitHub ↗

RunPreparation is called only once, and is called automatically when calling Open It is only here for benchmarking in combination with OpenHeadlessNoRun

(defaultScene Scene)

Source from the content-addressed store, hash-verified

84// RunPreparation is called only once, and is called automatically when calling Open
85// It is only here for benchmarking in combination with OpenHeadlessNoRun
86func 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
101func RunIteration() {

Callers 1

mobileDrawFunction · 0.70

Calls 2

NewClockFunction · 0.85
SetSceneFunction · 0.85

Tested by

no test coverage detected