Hello!, so i have made a brick breaker game that i saw on YouTube and I want when i click play before the ball starts moving, to have an image(of a character) appear and next to it a text that will disappear after a few seconds. Can anyone please help me?
i currently have made in a separate world to test it this:
and it just put the image and the text there and then they just stay there.
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) /** * Write a description of class cannot here. * * @author (your name) * @version (a version number or a date) */ public class cannot extends Actor { /** * Act - do whatever the cannot wants to do. This method is called whenever * the 'Act' or 'Run' button gets pressed in the environment. */ public void act() { setImage(new GreenfootImage("You cannot defeat me...!", 30, Color.WHITE, new Color(0,0,0,0))); Greenfoot.playSound("cannot.mp3"); Greenfoot.delay(100); Greenfoot.stop(); } }