Moved a few things around, definitely not clean but better.
This commit is contained in:
@@ -1,8 +1,14 @@
|
||||
module('spritebatch')
|
||||
module('time')
|
||||
module('camera')
|
||||
module('glm')
|
||||
|
||||
x = 0.0
|
||||
y = 0.0
|
||||
camera = cameraCreate(CAMERA_PROJECTION_TYPE_PERSPECTIVE)
|
||||
|
||||
print('Camera position')
|
||||
print(camera.position.x)
|
||||
print(camera.position.y)
|
||||
print(camera.position.z)
|
||||
|
||||
function sceneDispose()
|
||||
-- print('Disposing initial scene')
|
||||
@@ -10,19 +16,18 @@ end
|
||||
|
||||
function sceneUpdate()
|
||||
-- print('Updating initial scene')
|
||||
x = x + TIME.delta * 10.0
|
||||
y = y + TIME.delta * 10.0
|
||||
end
|
||||
|
||||
function sceneRender()
|
||||
-- print('Rendering initial scene')
|
||||
x1 = x + 32
|
||||
y1 = y + 32
|
||||
cameraPushMatrix(camera)
|
||||
|
||||
spriteBatchPush(
|
||||
nil,
|
||||
x, y,
|
||||
x1, y1,
|
||||
0, 0,
|
||||
1, 1,
|
||||
nil
|
||||
)
|
||||
spriteBatchFlush()
|
||||
|
||||
cameraPopMatrix()
|
||||
end
|
||||
Reference in New Issue
Block a user