Hello there, I am a beginner to Java and this site (not sure if this post is in the right place either, apologies if it isn't
Anyway I have been trying to make a simple platform game which currently consists of an image/sprite moving round on an image via Key events. The character currently jumps using the space bar.
However what i would like to do is make my character jump by mousePressing on the character, dragging the mouse downwards and letting go, like pulling back a catapult.
This has unfortunately caused me nothing but headaches.
Currently i cannot get the game to recognise when the character is being clicked, is there an easy way to do this?
Currently my character is just an ImageIcon, but im not sure if it has to be an object or a shape or something, I'm pretty confused. Mouse Listener is so much more complicated than using a keyboard!