This site requires JavaScript, please enable it in your browser!
Greenfoot
Username
Password
Remember Me?
Sign Up, Lost Password
Activity
About
Documentation
Download
Discuss
Scenarios
Discussions
You need to login to take part
Current Discussions
Passing score between world
By uanimal, with 1 reply.
Replied to by Zamoht, over 13 years ago:
Pass the score as an argument for the new world. I don't know much about your code but i guess it would have to look something like this. Greenfoot.setWorld(new Level2(score)); Then in the Level2 class you have to write something like: public Level2(int score) { //setup your level and do whatever you need to with the score }
Can someone help me?
By Chocomint1213, with 1 reply.
Replied to by uanimal, over 13 years ago:
import greenfoot.*; // (World, Actor, GreenfootImage, and Greenfoot) import java.awt.Color; import java.awt.Font; import java.util.Calendar; /** * The ScoreBoard is used to display results on the screen. It can display some * text and several numbers. * * @author M Kolling * @version 1.0 */ public class GameOver extends Actor { public static final float FONT_SIZE = 48.0f; public static final int WIDTH = 600; public static final int HEIGHT = 300; /** * Create a score board with dummy result for testing. */ public GameOver() {
Use string to define a class name?
By Entity1037, with 2 replies.
Last reply by Entity1037, over 13 years ago:
Oh, I didn't know those existed. Ok, that makes a lot of sense! Thank you!
cannot find - prepare(); error
By geekykid2013, with 4 replies.
Last reply by Kartoffelbrot, over 13 years ago:
ok
changing levels
By rachel1495, with 1 reply.
Replied to by Gevater_Tod4711, over 13 years ago:
InsteadOf Object balloon = ... you should use <Code Omitted>
Java keys
By JetLennit, with 4 replies.
Last reply by JetLennit, over 13 years ago:
Yeah, I also wanted to know what it was for java.. thanks!
How to make reset button?
By Miikku, with 4 replies.
Last reply by mellotelli45, over 13 years ago:
ye but it that it is there no other programming you can give me
Movement help!
By FCG, with 6 replies.
Last reply by FCG, over 13 years ago:
danpost wrote...
To move toward an actor that is more than 200 pixels away:: <Code Omitted>
Thanks it worked.
Shooting Help
By SWAG, with 5 replies.
Last reply by steved, over 13 years ago:
No problem
Help with bouncing from top to bottom
By programmer274, with 1 reply.
Replied to by programmer274, over 13 years ago:
If anyone could reply that would be great.
Loops Help
By Robert2.0, with no replies.
I can I add a timer the for my game using a for statement.
Scrolling Background in Actor?
By Solringolt, with 1 reply.
Replied to by danpost, over 13 years ago:
All you need to do is add an instance GreenfootImage field to the world class to hold the current background image. Since I do not know the direction or speed of the scrolling, I will also include an instance int to hold the scroll speed.
Scrollbar
By welleid, with 3 replies.
Last reply by Gevater_Tod4711, over 13 years ago:
I added a scrollbar into the scrolling system.
Here
you can find the link to the superclass. Hope this demo can help you. @Solringolt Thanks this demo by SPower realy helped good.
whats an attribute ?
By sergiodeleon702, with 1 reply.
Replied to by Game/maniac, over 13 years ago:
please explain your question
Help with changing levels
By collin.leck, with 6 replies.
Last reply by collin.leck, over 13 years ago:
thank you to everyone for the help. danpost thank you for the code and it works.
826
827
828
829
830
831
832
X