added initial support for reference objects
git-svn-id: svn://anubis/anaglym/trunk@241 99a6e188-d820-4881-8870-2d33a10e2619
This commit is contained in:
1 parent
9d9c16f3ad
commit
9058dcfefc
15 files changed
+289
-177
No files matched your search
@@ -1,13 +1,13 @@
|
||||
|
||||
function init_event()
|
||||
arena = ag.loadModelStatic("boxarena")
|
||||
arena = ag.loadModel("boxarena", { static = true })
|
||||
ball = ag.loadModel("checkerball")
|
||||
ball:setPosition(-7, 7.4, 12)
|
||||
ball2 = ball:clone()
|
||||
ball2:setPosition(-7, 7.4, 14)
|
||||
ball3 = ball:clone()
|
||||
ball3:setPosition(-7, 7.4, 16)
|
||||
logo = ag.loadModel("dwlogo", 0.5)
|
||||
logo = ag.loadModel("dwlogo", {scale = 0.5})
|
||||
logo:setPosition(-1, 2, 11)
|
||||
crate = ag.loadModel("crate")
|
||||
crate:setPosition(-5, -3, 10)
|
||||
|
||||
+2
-2
@@ -4,7 +4,7 @@ function init_event()
|
||||
|
||||
local rows = 5
|
||||
local offset = 1
|
||||
local pin = ag.loadModel("bowling_pin", 0.5)
|
||||
local pin = ag.loadModel("bowling_pin", {scale = 0.5})
|
||||
pin:setPosition(0, 0, 2)
|
||||
for row = 2, rows do
|
||||
for x = 1, row do
|
||||
@@ -21,7 +21,7 @@ function init_event()
|
||||
ag.setCamera(0.3, -25, 10, 0, 0, 1, 0, 0, 1)
|
||||
camx, camy, camz, cx, cy, cz = ag.getCamera()
|
||||
|
||||
ball = ag.loadModel("checkerball", 0.5)
|
||||
ball = ag.loadModel("checkerball", {scale = 0.5})
|
||||
ball:setPosition(2*camx - cx, 2*camy - cy, 2*camz - cz)
|
||||
ball:setMass(5)
|
||||
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
|
||||
function init_event()
|
||||
local levels = 7
|
||||
local crate = ag.loadModel("crate", 0.5)
|
||||
local crate = ag.loadModel("crate", {scale = 0.5})
|
||||
local offset = 0.5
|
||||
crate:setPosition(0, 0, offset + levels + 0.5)
|
||||
for level = 2, levels do
|
||||
@@ -12,7 +12,7 @@ function init_event()
|
||||
end
|
||||
end
|
||||
|
||||
local ground = ag.loadModelStatic("crate", 10)
|
||||
local ground = ag.loadModel("crate", { static = true, scale = 10 })
|
||||
ground:setPosition(0, 0, -10)
|
||||
ag.setCamera(levels/2, -2*levels, levels, 0, 0, levels/2, 0, 0, 1)
|
||||
camx, camy, camz, cx, cy, cz = ag.getCamera()
|
||||
|
||||
@@ -3,7 +3,7 @@ function init_event()
|
||||
crates = {}
|
||||
|
||||
levels = 5
|
||||
local crate = ag.loadModel("crate", 0.5)
|
||||
local crate = ag.loadModel("crate", {scale=0.5})
|
||||
crates[1] = crate
|
||||
offset = 0.5
|
||||
crate:setPosition(0, 0, offset + levels + 0.5)
|
||||
@@ -18,7 +18,7 @@ function init_event()
|
||||
end
|
||||
end
|
||||
|
||||
ground = ag.loadModelStatic("crate", 10)
|
||||
ground = ag.loadModel("crate", {static = true, scale = 10})
|
||||
ground:setPosition(0, 0, -10)
|
||||
ag.setCamera(2, -12, 8, 0, 0, 2, 0, 0, 1)
|
||||
end
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
function init_event()
|
||||
ag.import("std")
|
||||
image = ag.loadTexture("transparent.png")
|
||||
local crate = ag.loadModelStatic("crate")
|
||||
local crate = ag.loadModel("crate", {static = true})
|
||||
ag.setCamera(5, -5, 5)
|
||||
end
|
||||
|
||||
|
||||
@@ -25,10 +25,10 @@ function key_down_event(key)
|
||||
if (key == "b") then
|
||||
local box = ag.createBox(1, 1, 1)
|
||||
init_obj(box)
|
||||
elseif (key == "c") then
|
||||
-- cylinders are buggy in ODE
|
||||
local cyl = ag.createCylinder(0.5, 1)
|
||||
init_obj(cyl)
|
||||
-- elseif (key == "c") then
|
||||
-- -- cylinders are buggy in ODE
|
||||
-- local cyl = ag.createCylinder(0.5, 1)
|
||||
-- init_obj(cyl)
|
||||
elseif (key == "a") then
|
||||
local ccyl = ag.createCapsule(0.5, 1)
|
||||
init_obj(ccyl)
|
||||
|
||||
Reference in new issue
Block a user