deb package to include the JDK, to avoid Java packaging issues on Ubuntu and derivatives. Consequently, Greenfoot now requires a 64-bit CPU and 64-bit Operating System. Moved to Java 11 (OpenJDK+OpenJFX 11).Improved the "Instantiate a new world" message.Fixed an issue with scenarios loaded from an empty window not compiling all classes properly.Fixed an issue with the world not creating automatically on startup on Mac.Fixed a bug where lots of small calls to lay would trigger too many repaints, making the delays slower.Fixed issue where some scenarios could see a "tearing" or flickering effect during repaint.Fixed a bug during reset which could cause Greenfoot to freeze or no longer reset.New hint when you try to call methods like getX() after removing an actor from the world.Restored the "twirler" menu that aids terminating a stuck program (accidentally removed in 3.6.1).Fixed various issues where Greenfoot could get stuck while resetting or terminating the program.Fixed several corner cases for Greenfoot.ask, especially when used in a constructor.Added a popup to help select from overlapping actors when clicking them as method call parameters.Fixed saving/loading of abstract methods in abstract classes in Stride.Fixed various Stride editor bugs, especially around the frame cursor disappearing.New Java quick-fix feature to assist with solving simple errors like missing imports.Rewritten Java editor with better stability and performance.Fixed issue with Greenfoot crashing on MacOS 12 (Monterey).Fixed Actor/World documentation not showing up on Linux.Added autocomplete support for Greenfoot.isKeyDown (and similar static methods) by just completing on "Gr" and similar.Mac only release to fix issue with crashing on load in macOS 13 (Ventura).Fixed a bug where errors on the last line of a Java file (often, reached end of file while parsing after a missing close curly bracket) would not show at all.Fixed an issue with file opening on Mac.Switched to Java 17, added support for Java 17 language features.Fixed About dialog and file-open not working on Mac after certain actions.Fixed Greenfoot class documentation not showing on some operating systems.Fixed Import Class dialog (was empty on some operating systems).Added the new Actor.sleepFor(int) method.Removed ability to share to standalone JAR.Fixed Share to website function so that it works with new scenarios.GetWorld().addObject(new ScoreBoard(), 400, 400) * Act - do whatever the Goldasteroid wants to do. * Write a description of class Goldastroid here. GetWorld().addObject(new Alienship(), Greenfoot.getRandomNumber(700), Greenfoot.getRandomNumber(700)) * Act - do whatever the Alienship wants to do. * Write a description of class Alienship here. * Laser will destroy Alienship if it hits them. * Write a description of class Laser here. GetWorld().addObject(new Goldastroid(), Greenfoot.getRandomNumber(700), Greenfoot.getRandomNumber(700)) * If so then pick it up and add 50 points to score. * Check to see if we are touching a Goldastroid. GetWorld().addObject (laser, getX(), getY()) Laser laser = new Laser (getMovement().copy(), getRotation()) * Checks for a pressed key, if this is true it will exeacute an action. * the 'Act' or 'Run' button gets pressed in the environment. * Act - do whatever the Redship wants to do. Private static final int gunReloadTime = 15 * Write a description of class Redship here. Import greenfoot.* // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) SetImage(new GreenfootImage(stringLength, 16)) Private static final Color textColor = new Color(255, 180, 150) * Counter that displays a text and number. Image.drawString(prefix + score, 60, 200) GreenfootImage image = new GreenfootImage(WIDTH, HEIGHT) Private void makeImage(String title, String prefix, int score) MakeImage("Game Over", "Score: ", score) * Create a score board for the final result. * Create a score board with dummy result for testing. Public static final float FONT_SIZE = 48.0f * The ScoreBoard is used to display results on the screen. Import greenfoot.* // (World, Actor, GreenfootImage, and Greenfoot) I am trying to make it when I pick up a Goldasteroid the score will add up 5 and if I destroy an Alienship the score will add 10 points here is what I have: I need help on trying to get my score counter to work I have looked at many other forums for this and still nothing.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |