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

danpost's Comments

Back to danpost's profile

The intersection of the wire to the bulb should be restricted to the base of the bulb (connect a wire to the glass of the bulb should not make the light work).
@GreenGoo, first click on the cable to select it (it gets a little thicker). Then drag the object to where you want it. Keeping focus on the objects is a little tricky, but you should get by.
That was supposed to be '((SWorld)getWorld()).'.
Ok. Prefix with '((SWorld)getWorld).'.
Just prefix it with 'getWorld().'.
Same way I added the Counter object into the world in this scenario.
@JetLennit, it appears that you must have at least one statement between each set of squiggly brackets.
Start a discussion and show your code.
@FlyingRabidUnicornPig, you enter a window coordinate in the parameter and it returns the universal coordinate. The top-left corner of the window in window coordinates is always (0, 0), no matter what scrolling has taken place; however, in universal coordinates, (0, 0) is always the top-left corner of the scrolling area. So, for example, if you wanted to know how far the background can scroll to the left in order to get to the left edge of the universe (or the left-most scrolling limit), you can use 'int remainingScrollToLeft = getWorld().getUnivX(0);'