Visible property

Topics: User Forum
Oct 21, 2006 at 7:51 PM
Hi!

It is simple to implement and it will be nice if you add this in official component code:

in ParalaxComponent.cs

public class ParalaxBackgroundComponent : GameComponent
{

//NEW CODE FOR VISIBILITY
private bool m_visible = true;
public bool Visible
{
get { return m_visible; }
set { m_visible = value; }
}


...


public override void Draw()
{
if (m_visible)
{
using (SpriteBatch sb = new SpriteBatch(this.Game.GameServices.GetService<IGraphicsDeviceService>().GraphicsDevice))
{

Coordinator
Oct 21, 2006 at 7:53 PM
Hi,

I will add this in ASAP. :)
Thanks :)

Paul Kinlan
Coordinator
Oct 28, 2006 at 7:28 PM
This discussion has been copied to Work Item 4895. You may wish to continue further discussion there.