Scrolling Game Development Kit Forum
SGDK Version 2 => Help, Errors, FAQ => Topic started by: SmartBoy16 on 2010-01-09, 12:51:54 AM
-
Is there a way to hide or show a layer in runtime? Same question for reordering layers?
-
hide and show is possible, bluemonk (or durnurd?) once wrote a script for me. i don't have it here, though.
-
You could edit LayerBase.cs to add a property like
public bool isVisible = true;
Then edit the Draw function ("public void Draw()") so that it doesn't do anything if the layer is set to be be invisible:
if (!isVisible) return;
Whenever you want to show or hide the layer, just set its isVisible property.
-
(who knew it was that simple?) this helps, thanks!!!