43 lines
800 B
Lua
43 lines
800 B
Lua
module('spritebatch')
|
|
module('camera')
|
|
module('color')
|
|
module('ui')
|
|
module('screen')
|
|
module('time')
|
|
module('glm')
|
|
module('text')
|
|
module('tileset')
|
|
module('texture')
|
|
|
|
screenSetBackground(colorBlack())
|
|
camera = cameraCreate(CAMERA_PROJECTION_TYPE_ORTHOGRAPHIC)
|
|
|
|
tileset = tilesetGetByName("ui")
|
|
ui = textureLoad(tileset.texture)
|
|
|
|
function sceneDispose()
|
|
end
|
|
|
|
function sceneUpdate()
|
|
end
|
|
|
|
function sceneRender()
|
|
-- UI
|
|
cameraPushMatrix(camera)
|
|
camera.bottom = screenGetHeight()
|
|
camera.right = screenGetWidth()
|
|
|
|
slice = tilesetTileGetUV(tileset, 0)
|
|
spriteBatchPush(ui,
|
|
0, 0,
|
|
ui.width * slice.u1, ui.height * slice.v1,
|
|
colorRainbow(),
|
|
slice.u0, slice.v0,
|
|
slice.u1, slice.v1
|
|
)
|
|
spriteBatchFlush()
|
|
|
|
-- textDraw(0, 0, "Hello World", colorRainbow())
|
|
|
|
cameraPopMatrix()
|
|
end |