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

2013/5/16

whats wrong?

Avik Avik

2013/5/16

#
I want the coins to scroll with the background, thius is the code: import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) /** * Write a description of class coi here. * * @author (your name) * @version (a version number or a date) */ public class coi extends animal { /** * Act - do whatever the coi wants to do. This method is called whenever * the 'Act' or 'Run' button gets pressed in the environment. */ public void moveCoins(int dx, int dy) { <coin> coins = getObjects(Coin.class); for (Coin coin : coins) { coin.setLocation(coin.getX() + dx, coin.getY() + dy); } } }
Avik Avik

2013/5/16

#
please correct and send me the code
You need to login to post a reply.