Alright, sometimes I think I’m just out to hurt myself or strain my brain.. and as much as I want to thank Nemo for his wonderful particle tutorials, this is something I have to do. Im trying to make the GameStateManagement sample and the Particle sample play nicely together, and I just dont get it..
I’ve gone through and I know both projects work fine standalone.. even with my changes. So I add the classes from the PS to the GSM template I have. I changed the namespaces and all hoping it would make this easier.. Yeah right.. But it runs.
I then create an instance of the Particle system like this:
That works fine! But now its time to actually create it.. so we type in this:
mytest1 = new MyTestParticleSystem(this , 10, new Vector3(2, 54, 114));
Doh.. It breaks right there.. The constructor requires a game object.. I thought I passed it one.. but ooooooh noooo.. It hates me.. It truly truly hates me.. and then it has the nerve to YELL at me!!! Like this!!!
Error 1 The best overloaded method match for
Microsoft.Xna.Framework.Vector3)’ has some invalid arguments
ScreensGameplayScreen.cs 54 23 ParticleGameState1
Now I thought I was passing it the right things.. but apparently not.. The constructor for the particle system is this:
public class MyTestParticleSystem : ParticleSystem
public MyTestParticleSystem(GameStateManagement.GameStateManagementGame game, int howManyEffects, Vector3 col)
: base(game, howManyEffects)
particleColor.X = col.X;
particleColor.Y = col.Y;
particleColor.Z = col.Z;
As far as I can tell, passing it as ‘this’ or ‘gamestatemanagement.gamestatemanagementgame’ should work.. but apparently not..
Any thoughts? If you want, heres a link to the zipped project.. please someone tell me / show me where I’m going wrong with this.. before I’m bald..
Leave a comment if you can tell me where Im going wrong or email me!