anaglym/tests/ballstairs.lua
Josh Holtrop 207f7e628a finished implementing ag::object::destroy() so lua calls to object:destroy() will correctly remove the object from the scene
git-svn-id: svn://anubis/anaglym/trunk@67 99a6e188-d820-4881-8870-2d33a10e2619
2009-10-12 16:16:39 +00:00

27 lines
660 B
Lua
Executable File

function update()
elapsed = ag.elapsedTime()
if (elapsed > 2000 and ball2there) then
ball2:destroy()
ball2there = false
end
ballx, bally, ballz = ball:getPosition()
ag.setCamera(7, -6, 15, ballx, bally, ballz, 0, 0, 1)
ag.doPhysics()
ag.startFrame()
ag.drawObjects()
ag.endFrame()
end
--ag.setCamera(8, -8, 15, -8, 8, 4, 0, 0, 1)
arena = ag.loadStaticModel("boxarena")
ball = ag.loadModel("ball")
ball:setPosition(-7, 7.4, 12)
ball2 = ball:clone()
ball2:setPosition(-7, 7.4, 14)
ball2there = true
ball3 = ball:clone()
ball3:setPosition(-7, 7.4, 16)
logo = ag.loadModel("dwlogo")
logo:setPosition(0, 2, 11)