added ag::drawImage()
git-svn-id: svn://anubis/anaglym/trunk@185 99a6e188-d820-4881-8870-2d33a10e2619
This commit is contained in:
1 parent
f410c305c2
commit
5de4ed348b
5 files changed
+115
-28
No files matched your search
@@ -25,6 +25,8 @@ function init()
|
||||
ball:setMass(5)
|
||||
--ball = ag.createSphere(0.4)
|
||||
--ball:setColor(0.2, 0.2, 0.9)
|
||||
|
||||
crate_texture = ag.loadTexture("crate.png")
|
||||
end
|
||||
|
||||
function mousebutton_down_event(button)
|
||||
@@ -59,4 +61,6 @@ function update_overlay_event(width, height)
|
||||
ag.drawLine(1, 0.7, 1, 50, 10, 100, 60, 5)
|
||||
ag.drawRect(0, 1, 0, 40, 40, width / 2, height / 2)
|
||||
ag.fillRect(0, 0, 1, 20, 30, width / 2, height / 2)
|
||||
local rot = ag.elapsedTime() / 10
|
||||
ag.drawImage(50, 50, 80, 160, crate_texture, rot)
|
||||
end
|
||||
Reference in new issue
Block a user