Better
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
local Cube = include('entities/cube.lua')
|
||||
|
||||
local cam
|
||||
local cube
|
||||
|
||||
function Scene:init()
|
||||
print("Scene init")
|
||||
local camId = entityAdd()
|
||||
local pos = entityPositionAdd(camId)
|
||||
pos.x = 3
|
||||
pos.y = 3
|
||||
pos.z = 3
|
||||
pos:lookAt(0, 0, 0)
|
||||
entityCameraAdd(camId)
|
||||
cam = camId
|
||||
|
||||
cube = Cube.new()
|
||||
end
|
||||
|
||||
function Scene:update()
|
||||
end
|
||||
|
||||
function Scene:dispose()
|
||||
cube:dispose()
|
||||
entityRemove(cam)
|
||||
end
|
||||
Reference in New Issue
Block a user