Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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)

share|improve this question
    
I found the answer to question 3. farseerphysics.codeplex.com/discussions/403119 –  Krell Nov 16 '12 at 3:56
add comment

1 Answer

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.

share|improve this answer
    
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 –  Krell Nov 13 '12 at 7:05
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.