From 9b047199eb4b90c16101b70dcd2405e0d37f7283 Mon Sep 17 00:00:00 2001 From: Aki Date: Tue, 12 Sep 2017 01:44:57 +0200 Subject: Scaled Layers prototype --- not/World.lua | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'not') 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() -- cgit v1.1