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();
}
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.
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);
}
This looks really cool and I looked at the source code but none of it makes sense to me... You didnt put any //explanations on anything. Any chance you could explain some of it?
Yah, I'll add some stuff, don't expect anything tonight, but I'll add some comments within the next few nights. And I'll see if I can get Actor images as well.
2013/9/2
2013/9/2
2013/9/2
2013/9/2
2013/9/2
2013/9/2
2013/10/14
2013/10/15
2013/10/15