I've run into a bit of trouble with my doors. The code for going to the next level is
However, I have another door to that room and I want the player to spawn at a different location if he uses the other door. I have tried using this code, but it doesn't seem to be working
How would I go about doing this?
Thanks
1 2 3 4 | if (getOneIntersectingObject( DoorToRoom. class ) != null ) { Greenfoot.setWorld( new SmallRoom()); } |
1 2 3 4 5 | if (getOneIntersectingObject( DoorToRoom. class ) != null ) { Greenfoot.setWorld( new World2()); setLocation( 500 , 500 ); } |