Game Development Reference
In-Depth Information
-- Corona SDK has a black background, so we need to have a white rectangle
-- till it is replaced with a background image.
and the following for Gideros Studio:
local performAfter = Timer.delayedCall
local bullets = {} -- container to hold the bullets fired
local scenery = {} -- the objects that make up the scenery
local sounds = {} -- the array that holds all the sounds in it
local restartGame = nil -- the handler function
local survivor, tanker
local waiting = 0
function loadImage(imageName, x, y)
local x = x or 0
local y = y or 0
local image = display.newImage(imageName, x, y)
return image
end
And with Gideros Studio, we use the following:
function loadImage(imageName, x, y)
local x = x or 0
local y = y or 0
local image = Bitmap.new(Texture.new(imageName))
stage:addChild(image)
image:setPosition(x,y)
image.width = image:getWidth()
image.height = image:getHeight()
return image
end
 
Search WWH ::




Custom Search