modules/world: only attach view to camera if one is requested
This commit is contained in:
parent
9c3ef4ce65
commit
79ecdc822b
1 changed files with 8 additions and 4 deletions
|
@ -83,15 +83,19 @@ function CameraSystem:getViewCam(id)
|
|||
end
|
||||
|
||||
function CameraSystem:attachView(id)
|
||||
if (id ~= nil) then
|
||||
local cam = self:getViewCam(id)
|
||||
|
||||
cam:attach()
|
||||
end
|
||||
end
|
||||
|
||||
function CameraSystem:detachView(id)
|
||||
if (id ~= nil) then
|
||||
local cam = self:getViewCam(id)
|
||||
|
||||
cam:detach()
|
||||
end
|
||||
end
|
||||
|
||||
return CameraSystem
|
||||
|
|
Loading…
Reference in a new issue