XNA Creators Club Online
Page 1 of 1 (4 items)
Sort Posts: Previous Next

Unloading GamerTag

Last post 7/9/2009 4:09 PM by dadoo Games. 3 replies.
  • 7/4/2009 7:21 PM

    Unloading GamerTag

    Hi All,

    I have followed the tutorial by Bruno Silva for loading the Gamertag content (found here:GamerTag) and it works Great!

    The only problem I am having is if a currently playing user cancels/disconnects out of the game, the game continues to display their GamerTag information.

    What I would ultimately like is to remove/unload their GamerTag information from the screen.

    So far I have this:

     if (profile != null
     {    
        spriteBatch.Draw(profile.GamerPicture, GamerPictureRectangle, Color.White); 
        spriteBatch.DrawString(GTfont, gamer.Gamertag, gamerTagVector, Color.White); 
     } 
     if (gamer == null
     { 
       //Draws default player info in place of gamertag info 
       spriteBatch.Draw(Game1.green_icon, new Vector2(30, 25), Color.White); 
     } 


    Any thoughts? Thanks all

    ~C5


  • 7/4/2009 8:25 PM In reply to

    Re: Unloading GamerTag

    profile = null;
  • 7/4/2009 8:40 PM In reply to

    Re: Unloading GamerTag

    Hey Mpipe,

    Thanks for the reply, I have tried that previously and get the same result. Currently, if the game begins, the default player info will be displayed. A second player can log in at any time and their GamerTag info will then be displayed. If that second player decides to sign out, their profile remains on the screen and in the game content (eg if they had a higher score at the very end, it says 'GamerTag2' wins.
  • 7/9/2009 4:09 PM In reply to

    Re: Unloading GamerTag

    You can subscribe to the SignedInGamer.SignedOut event to be notified when a gamer profile has signed out.
Page 1 of 1 (4 items) Previous Next