@alikhan, after reviewing the class myself, I realize that it may be quite complicated for you, as it is riddled with extra stuff that would not be needed in your case. You should probably attempt something (create your Tank, Turret, and Shot classes) and when you run into difficulties, start a new discussion thread for help, posting the code you tried, copy/pasting any error messages you may be getting, and describing your issue both in general and in detail, providing any and all possible pertinent information..
@alikhan, there are many scenarios on the site (some of mine included) that have examples of using mouse clicks to aim and fire shots from an object. My Global Defense scenario has cannons that aim and shoot by mouse actions, for example (and you can view the code of the Cannon class within the running of the scenario itself. Just do a search on 'Global Defense'.
You could use the extra condition (besides the door being clicked on) that no key object be in the world: if ( getWorld().getObjects(Key.class).isEmpty() && Greenfoot.mouseClicked(this) )
From the information I have gathered from your 'Questions I suspect you might have' section, I would think that this works in a way similar to my 'PIP Actor class' scenario. Am I correct?
The last statement should include the code where you are trying to pass the score to the Gameover world. When supplying code, also include what class the code is in and how it relates to the World or Actor class.
2014/11/11
Tank Game
2014/11/11
Tank Game
2014/11/9
Mouse Click Game: Keys and Doors
2014/11/7
Extreme Greeps with Download
2014/11/1
Blackjack
2014/10/29
ScrollingWorld showcase
2014/10/26
Storage test
2014/10/24
Belt of Danger
2014/10/24
Belt of Danger