1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
print("Phys was:",phys)
for k,v in pairs(phys) do
print(k,":",v)
end
local cam = scene.newcamera()
--local cam_m = getmetatable(cam)
--print("cam's meta table is ",cam_m)
--for k,v in pairs(cam_m["__index"]) do
-- print(k,":",v)
--end
--print("attempting to create the first physbox")
local cambox = phys.newcphysbox({1,1,1},{0,0,0},1)
--print("function is",phys.newphysbox);
--print("attempting to create the second physbox")
local floor = phys.newcphysbox({10,1,10},{0,-10,0},0)
local floor_light = scene.newlight(1000,{0,-5,0})
--print("created cam box")
print("cambox_m is:")
local cambox_m = getmetatable(cambox);
for k,v in pairs(cambox_m["__index"]) do
print(k,":",v)
end
print("cambox is:")
for k,v in pairs(cambox) do
print(k,":",v)
end
floor:setcpos({0,5,0})
print("floor is:")
local floor_m = getmetatable(floor);
for k,v in pairs(floor_m["__index"]) do
print(k,":",v)
end
--print("gui is:")
--for k,v in pairs(gui) do
--print(k,":",v)
--end
--local checkbox = gui.newcheckbox({0,0},{100,100},0,"test");
--floor_light:getpos()
--GAME.tick = function()
--print("In game tick")
--cam:setpos(cambox:getpos())
--end
GAME.onKeyDown = function(key,down,ctrl,shft)
if(down and key == 65) then -- a
print("Setting box's position")
cambox:setcpos({0,5,0})
print("After setpos was called")
end
print("Got key input:",key,down,ctrl,shft)
end
|