North of Tampa in Lutz, Florida. A Tampa Divorce Lawyer focusing on family, divorce, and real estate law.
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.
See the updated post for this here:
http://www.bluerosegames.com/silverlight-games-101/post/A-simple-Silverlight-game-particle-system.aspx
http:// said:
Maybe I'm just blind, but I can't see where ParticleSystem.HostControl gets initialized. Did you leave that out? I get null dereference problems without one. My fix was to put: ParticleFactory.HostCanvas = this; in the Page.xaml.cs Page_Loaded event. Is there a different/nicer way?
Yep sorry, I left it out of the tutorial but it's in the code sample zip file. I'll update the tutorial to match. Thanks, Bill
The code does not seem to work on any system which does not use . for the decimal point. This includes a lot of european systems. To fix change the line AddParticle to the line below than it should work. Thanks for this tutorial, Bart Vries string animationXaml = string.Format(CultureInfo.InvariantCulture, sw.ToString(), duration, particleName, start.X, start.X + velocity.X * LifeSpanSeconds, start.Y, start.Y + velocity.Y * LifeSpanSeconds, FromOpacity, ToOpacity);