Re: Re: Drawing only specific layers?
You are here: Home / Latest News/Blog / Re: Re: Drawing only specific layers?
Home › Forums › TimelineFX Module › Drawing only specific layers? › Re: Re: Drawing only specific layers?
September 29, 2010 at 4:47 pm
#3721
imported_peterigz
Participant
Hello. To do this what you need to do is create a particle manager for each layer, so you could have Background_PM, Middle_PM, Foreground_PM, and Overlay_PM, and call drawparticles for each one in-between each of your own layers. ie.
CurrentLevel.map.layer = 0
For Local Image:TDraw = EachIn ImageRegList[IR_Back]
Image.Render()
Next
CurrentLevel.Map.Draw (WorldX, WorldY, 0, 0, GraphicsWidth() , GraphicsHeight())
Background_PM.DrawParticles()
For Local Image:TDraw = EachIn ImageRegList[IR_Mid]
Image.Render()
Next
CurrentLevel.map.layer = 1
CurrentLevel.Map.Draw (WorldX, WorldY, 0, 0, GraphicsWidth() , GraphicsHeight())
Middle_PM.DrawParticles()
CurrentLevel.map.layer = 2
CurrentLevel.Map.Draw (WorldX , WorldY , 0 , 0 , GraphicsWidth() , GraphicsHeight() )
For Local Image:TDraw = EachIn ImageRegList[IR_Fore]
Image.Render()
Next
Foreground_PM.DrawParticles()
For Local Image:TDraw = EachIn ImageRegList[IR_Overlay]
Image.Render()
Next
Overlay_PM.DrawParticles()
You can create as many particle managers as you want to organise when you want different particles to be drawn. To see an example in action you can download the vaders game from this site where I think I used 3 different particle managers for this reason.
Hope that helps!