So I have the following code:
and when run it always executes the setImage "Made by TeaNCode" instead of the setImage "tecup.png", which I believe to be a bug. The initial setImage is just to ensure that this is the issue is being caused by that if statement. I have the latest version of Greenfoot.
1 2 3 4 5 6 7 8 9 10 11 | public void change(){ setImage( "tecup.png" ); if (getImage() == new GreenfootImage( "tecup.png" )){ setLocation( 25 , 15 ); setImage( "tecup.png" ); } else { setLocation( 75 , 25 ); setImage( new GreenfootImage( "Made by TeaNCode, Copyright 2016" , 12 , Color.WHITE, new Color( 0 , 0 , 0 , 0 ))); } } |