Created
August 10, 2014 23:08
-
-
Save nucleartide/0be23c16e20e9acf6271 to your computer and use it in GitHub Desktop.
Testing out GamePlay3D ♥
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function initialize() | |
-- Display splash screen for at least 1 second. | |
ScreenDisplayer.start("drawSplash", 1000) | |
ScreenDisplayer.finish() | |
end | |
function drawSplash() | |
local game = Game.getInstance() | |
game:clear(Game.CLEAR_COLOR_DEPTH, 0, 0, 0, 1, 1.0, 0) | |
local batch = SpriteBatch.create("res/lua-logo.png") | |
batch:start() | |
batch:draw(game:getWidth() * 0.5, game:getHeight() * 0.5, 0.0, -- (x, y, z) | |
512.0, 512.0, -- (sprite width, sprite height) | |
0.0, 1.0, -- (u1, v1) | |
1.0, 0.0, -- (u2, v2) | |
Vector4.one(), -- Tint color. | |
true) -- Position specified above is sprite center. | |
batch:finish() | |
end | |
function update(elapsedTime) | |
end | |
function render(elapsedTime) | |
-- Clear the color and depth buffers. | |
Game.getInstance():clear(Game.CLEAR_COLOR_DEPTH, Vector4.zero(), 1.0, 0) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment