oh sorry it's a boss fight between metroid and gannondorf?
i just want the key controls
the code to animate the movement
hitboxes for her cannon
a code for the shots
a code so that it takes more than one shot to kill him
and anything else that you can thing of for a basic game
That's realy much.
Do you want us to programm your whole game???
Well first you should reed the Greenfoot API (link: http://www.greenfoot.org/files/javadoc/greenfoot/package-summary.html)
That would be helpfull.
For key controlls use the method Greenfoot.isKeyDown("keyname").
To animate movement you should use setLocation.
You should first try to add this because the code for the other things in your list are much longer and also much more difficult.
Ok but we can't programm your whole source code.
Maybe you should first do the Greenfoot Tutorials (link: http://www.greenfoot.org/doc) before you try to programm your own game. They're realy helpfull.
If you want an actor to use your image you have to save the image in your greenfootproject. Then you can set an actors image using this code:
//in the class you want the actor to change the image;
setImage(new GreenfootImage("filename.png"));//filename has to be the name of the picture;
setImage(new GreenfootImage("fiename")); is the whole code. You can find the method in the Greenfoot API (http://www.greenfoot.org/files/javadoc/greenfoot/package-summary.html). The method setImage is in the class Actor and new GreenfootImage(String filename) is in the class GreenfootImage.
Using this programm: http://www.greenfoot.org/scenarios/5949 you can calculate how many acts there are per second.
If you know this you can count the acts using a integer that you count up every act.
For example:
You got 35 acts per second.
int counter;
public void act() {
counter++;
if (counter >= 35) {
//one second is over;
}
}
2013/1/11
2013/1/11
2013/1/11
2013/1/11
2013/1/11
2013/1/12
2013/1/13
2013/1/13
2013/1/13
2013/1/14