Jump to content
  • Advertisement
Sign in to follow this  
Xadeu2005

[.net] handling KeyStrokes from separate object?

This topic is 4853 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello all, I am making a puzzle game, obviously I need to be able to handle keystrokes. I know how to create a DirectInput device. What is the best way to incorporate that object into my game? Also how do objects get passed from one class to another without pointers? Thanks, Xadeu2005

Share this post


Link to post
Share on other sites
Advertisement
You don't, you use pointers. Say you have an object that's not a pointer? So what you do is create a pointer of that object type, and then assign it's value to the adress of that object. Then you can use it to point to that object.

Share this post


Link to post
Share on other sites
How would I do this using C# .NET with Managed DirectX 9.0c?

Is it still the same concept?
I didn't think it was necessary to create pointers in C# .NET

Thanks for your time,
Xadeu2005

Share this post


Link to post
Share on other sites
All non-value objects are references (think of them like pointers) by default. You don't need to explicitly pass them as that, but it is important to understand. As far as how to handle Key strokes, do you need to pass the key strokes to many different objects, or is a single object handling all of the input?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!