Hi,
I have a basic
java knowledge(Syntax, basic OOP), but I don't know how I can make a structure of my classes. I want to write a game with some sprites(rabbits) and background pictures. You kill the rabbits and they die. A simple game...
I thought I create for every sprite a
thread that calculates the x,y position. Every Thread has an object of the sprite with some data about the health and so on.
My Problem is : Where can I get an example of a game like this?
I don't know how I should work with the mouseEvents. I add the mouseListener to the Panel, but create the threads in an other class. So how can I implement: If the user click on the rabbit at X,Y; the sprite thread must die(or init again). But I can't access the thread because it is created in an other class! Arggg... there are a lot of problems like this of structuring this game.
Please help with an example, or better with a discription...
Thanks a lot!