summaryrefslogtreecommitdiffhomepage
path: root/not
diff options
context:
space:
mode:
authorAki <nthirtyone@gmail.com>2017-09-12 01:44:57 +0200
committerAki <nthirtyone@gmail.com>2017-09-12 01:44:57 +0200
commit9b047199eb4b90c16101b70dcd2405e0d37f7283 (patch)
tree2006b588c5f18f98e33643511916b5dfcdcef7c5 /not
parentfac7abd6ebe81ee483b1a98aaf02caa1ac6a71df (diff)
downloadroflnauts-9b047199eb4b90c16101b70dcd2405e0d37f7283.zip
roflnauts-9b047199eb4b90c16101b70dcd2405e0d37f7283.tar.gz
roflnauts-9b047199eb4b90c16101b70dcd2405e0d37f7283.tar.bz2
Scaled Layers prototype
Diffstat (limited to 'not')
-rw-r--r--not/World.lua12
1 files changed, 11 insertions, 1 deletions
diff --git a/not/World.lua b/not/World.lua
index b386598..118346b 100644
--- a/not/World.lua
+++ b/not/World.lua
@@ -24,10 +24,20 @@ function World:new (map, nauts)
self.entities = {}
local width, height = love.graphics.getDimensions()
self.layers = {}
- for i=1,7 do
+ for i=1,6 do
table.insert(self.layers, Layer(width, height))
end
self.layers[1].ratio = 0
+ -- TODO: Scaled layers for Rays and future extensions.
+ do
+ local layer = Layer(320, 180)
+ layer.ratio = 0
+ layer.draw = function (self)
+ love.graphics.setColor(255, 255, 255, 255)
+ love.graphics.draw(self.canvas, 0, 0, 0, getScale(), getScale())
+ end
+ table.insert(self.layers, layer) -- 7
+ end
self.map = map
self:buildMap()