1
\$\begingroup\$

I'm sure this is totally simple and yes I am new at this.

I am trying to set up Krypton inside farseer.
1. create a new Krypton engine in my sub screen aka AdvancedDemo1 : PhysicsGameScreen, IDemoScreen Via this.krypton = new KryptonEngine(this, "KryptonEffect"); The problem is the KryptonEngine(this wants reference to Game game, I cant seem to reference it from FarseerPhysicsGame : Game So how would I do that?

or 2. I can put it directly in FarsserPhysicsGame but again I cant seem to figure out how to reference FarseerPhysicsGame in AdvancedDemo1.

or 3. I can put it inside the public FarseerPhysicsGame() and do Componenets.Add(krypton) [which works] HOWEVER I cant figure out how to reference the compoenet once it is added.

You should be able to stop reading here , but for more detail I simply took the Farseer XNA Samples went into FarseerPhysicsGame.cs and deleted all the screens and menus except AdvancedDemo1 so there is one option and I just click that to load into the advancedDemo1 and thats where I want to put the lights from krypton.

Thanks.

Edit: Figured out 1 solution though I am still curious about others. Solution 1 I was able to use ScreenManager.Game(not sure why it was there but Ill try to figure it out later)

\$\endgroup\$
1

1 Answer 1

1
\$\begingroup\$

Well, the way I would do this is just have the two solutions imported alongside the main solution and then have the main solution reference each one. Then you can play with both Krypton and Farseer in your solution.

Then you can pass your Microsoft.Xna.Framework.Game class to whatever function you want.

I'm not quite sure exactly what you wish to do, but if it's just wanting to be able to use both libraries/solutions from within your solution, you don't need to do much more than import both solutions and then reference them. (Right click on your solution at the very top, then add reference)

If it's something else, please disregard the preceding.

\$\endgroup\$
1
  • \$\begingroup\$ Thanks for the Responce. Effectivly what I did was take the farseer physics samples for xna. Add the Krypton project directly from the sample directly to the entire solution. So in my solution I have DebugView XNA (Project aka farseer), The farseer Libarary(as a project default from teh samples), Samples Xna(the default samples from the farseer site as another project), and finally Samples XNA Content. I'm happy to post any code you might want to see. Thanks again \$\endgroup\$
    – Krell
    Commented Nov 13, 2012 at 7:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .