Game Development Reference
In-Depth Information
The new pull-to-refresh organic blob, as seen in iOS 6
objects:
MOAISim.openWindow("Slimey Blob", 320, 480)
viewport = MOAIViewport.new()
viewport:setSize(320,480)
viewport:setScale(320,-480)
viewport:setOffset(-1,1)
layer = MOAILayer2D.new()
layer:setViewport(viewport)
MOAISim.pushRenderPass(layer)
Then we create the scriptDeck that we can use to draw our graphics on:
canvas = MOAIScriptDeck.new()
canvas:setRect(-64,-64,64,64)
canvas:setDrawCallback(onDraw)
prop = MOAIProp2D.new()
prop:setDeck(canvas)
layer:insertProp(prop)
Finally, we need to now create the function that is responsible for all the drawing:
bottomOriginY = 100
bottomRadius = 10
Search WWH ::




Custom Search