@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);'
The Smoke class should extend the ScrollActor class. That, and you using the wrong x and y to place your smoke into the world (in the ship class). The 'makeSmoke' method should be like this:
private void makeSmoke()
{
count--;
if (count == 0) {
ScrollWorld sw = (ScrollWorld) getWorld();
getWorld().addObject ( new Smoke(), sw.getCameraX(), sw.getCameraY());
count = 2;
}
}
You may want to add a 'setPaintOrder' statement in your subclass of ScrollWorld.
Oh, and move your call to 'makeSmoke' inside the 'up' key detection clause
I think either Greenfoot's UserInfo storage is not accessable (not because of you not being logged in) or a bug has cropped up within Greenfoot. It is acting very strange. Resetting fixes the 'not logged in' part; but an error occurs when you then 'start' the scenario (which never happened before).
@ronzhi, please start a discussion and explain in detail what you attempting and how it is not working the way you want, giving the exact error message, and what code you are using (including the InfoWorld class constructors, since you are creating a new instance of that class).
2013/5/10
Scrolling SuperWorld
2013/5/9
UserInfo Greeps
2013/5/9
UserInfo Greeps
2013/5/8
Space Game test
2013/5/6
Poll Taker
2013/5/5
Private Messaging
2013/5/3
Noughts and Crosses Complete
2013/4/30
World Changing Demo
2013/4/30
Private Messaging