If my projectile hits the target, he needs to change his image.
but its not working quite well.. This code is in my projectile class.
1 2 3 4 5 | Player rakete = new Player(); if (isTouching(Player. class )){ rakete.setImage( "explosion.jpg" ); getWorld().showText( "IHRE RAKETE WURDE ZERSTÖRT." , getWorld().getWidth()/ 2 , getWorld().getHeight()/ 2 ); Greenfoot.stop(); |