These things take time but as long as you’re having fun and engaging, it’ll come! ![]()
Yep absolutely… that’s exactly what I’ve tried to accomplish with the code I’ve given you. You have to abstract your input behind an interface that’s a little more generic, then you can implement that interface with whatever means of input you like. In the code I gave you, I know I’m designing games that should have the same input on both PC and Android, which means I’m pretty constrained to just what the touch pad can provide. My interface only asks for the position of the input and whether or not it is currently touching the screen. On PC I can get this position and whether or not the mouse is down, on Android the surface position will only be available when the surface is touched, but it amounts to the same thing. That same interface can be implemented with a gamepad too, using the analog sticks to control the pointer position and any button to simulate a tap/click.
When you code with interfaces like this, the code that interacts with the interface doesn’t care what device is doing the work, all it cares about is the data that the interface says it will provide. Hopefully that makes sense ![]()
I have no experience with MonoGame.Extended… haha all I know is that they apparently use a library I co-wrote a long time ago that does simple primitive 2D graphics, which is kind of interesting
Anyway, I have no idea how MonoGame.Extended does but I suspect the polling in the game loop is what generates the input event. You can probably use whichever method you like. As for specific help with using MonoGame.Extended, sorry, I don’t really have anything to offer. All I can tell you is that when I struggle to understand stuff that others have written, I have a tendency to go off and write my own version… not as a replacement, just as a way to gain basic understanding and insight into what they’re doing so I can better understand what’s happening. This is just my personal approach and isn’t for everyone… it just helps me understand what’s happening.