This site requires JavaScript, please enable it in your browser!
Greenfoot back

danpost's Comments

Back to danpost's profile

I think that 'fan' would be a bit strong; sci-fi has always peaked my interest, however.
@Kartoffelbrot, it is 'Resistance is futile!'.
Updating a scenario is done pretty much the same as uploading it to begin with. As long as you do not change the Scenario name in the dialog box.
Sorry, both 'img' in the above should be 'getImage()'.
It would only take one or two random choices to produce added effect. Try this for the Dot constructor: public Dot() { setImage(new GreenfootImage(15, 15)); getImage().drawRect(Greenfoot.getRandomNumber(2)==0?img.getWidth()-2:0, Greenfoot.getRandomNumber(2)==0?img.getHeight()-2:0, 1, 1); }
Area of sphere is missing. Also, could include trig and integration formulae. Noticed that the text image shadow-flashes during display of formula(e).
Finally, in your world class 'makeDefault' method, add the following condition for the statements in the following block: if (UserInfo.isStorageAvailable()) { GreenfootImage ui = new GreenfootImage(UserInfo.getMyInfo().getUserImage()); ui.scale(100,100); def2.drawImage(ui,getWidth()/2-50,getHeight()/2-50); }
Also, instead of copying each pixel color from one image to the next, just use the GreenfootImage method 'drawImage'. For example you can change one of your MagnifyImage class 'magnifyImage' methods to: public static GreenfootImage magnifyImage(GreenfootImage img) { GreenfootImage image = new GreenfootImage(img.getWidth()/2, img.getHeight()/2); image.drawImage(img, -img.getWidth()/4, -img.getHeight()/4); image.scale(img.getWidth(), img.getHeight()); return image; } and similar for the other one.
Change your MouseActor class act method to this: public void act() { MouseInfo mouse = Greenfoot.getMouseInfo(); if (mouse == null) return; setLocation(mouse.getX(), mouse.getY()); updateImage(); }