Page 1 of 1
Make layer invisible in ATL? [SOLVED]
Posted: Sat Jul 19, 2014 2:47 pm
by herksaw
Let's say I have two layer, which named "background" and "foreground" respectively. Is it possible to make the foreground layer "invisible" in runtime?
Re: Make layer invisible in ATL?
Posted: Sat Jul 19, 2014 3:42 pm
by undef
Set the alpha to 0, with love.graphics.setColor
Re: Make layer invisible in ATL?
Posted: Sat Jul 19, 2014 4:05 pm
by dan369
Each tile-layer has an opacity, just change it's value to 0 and the ATL [yourMap]:draw() function does the rest!
Could also just set the tile-layer not to be visible (you have 1 less render call that way).
Example:
Code: Select all
if (key == "f1") then map("Collision Layer").visible = not map("Collision Layer").visible; end