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

flash a sprite white

Last post 8/11/2008 12:37 AM by leeky. 4 replies.
  • 8/10/2008 6:24 PM

    flash a sprite white

    hello.

    i have some sprites and when they get hit i change the color in the spitebatch.draw call to black and then back to white next update call so that they quickly flash black when hit. but now i want them instead to flash white, but i can't seem to get it since when i put in Color.White it takes that to mean no tint. any idea as to how i could make it flash white?

     thanks in advance

  • 8/10/2008 7:42 PM In reply to

    Re: flash a sprite white

    A simple trick is to draw the sprite once normally, then draw it again with SpriteBlendMode.Additive.

    Alternatively, you could use a pixel shader (check out the Education tab for samples and tutorials on those).

  • 8/10/2008 8:26 PM In reply to

    Re: flash a sprite white

    okay i'll check that out. thank you
  • 8/10/2008 9:35 PM In reply to

    Re: flash a sprite white

    Hi leeky,

    Here's a link  to a discussion I had with The ZMan where he helped me achieve a similar effect,  maybe the methodology / code  therein  would be of benefit to you.

     

    Regards. 

     

     

     


    Man Is The Warmest Place To Hide
  • 8/11/2008 12:37 AM In reply to

    Re: flash a sprite white

    hey thanks for that link. i didn't get to try it yet, but i read the thread and it sounds like it'll be helpful. thanks a lot
Page 1 of 1 (5 items) Previous Next
var gDomain='m.webtrends.com'; var gDcsId='dcschd84w10000w4lw9hcqmsz_8n3x'; var gTrackEvents=1; var gFpc='WT_FPC'; /*<\/scr"+"ipt>");} /*]]>*/
DCSIMG