Hey guys... i'm trying to add difficulty into my game, but even though i get no errors or anything else, it seems not to be working. Here's my code:
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) import java.awt.Color; /** * Write a description of class Instructions here. * * @author (your name) * @version (a version number or a date) */ public class Instructions extends Actor { public Instructions() { setImage ( new GreenfootImage("Difficulty levels: Justin Bieber (e), Normal (n), INSANE!!! (h)", 50, Color.RED, Color.GREEN)); difficulty(); } public void difficulty() { if(Greenfoot.isKeyDown("e")) { Greenfoot.setSpeed(40); } else if(Greenfoot.isKeyDown("n")) { Greenfoot.setSpeed(50); } else if(Greenfoot.isKeyDown("h")) { Greenfoot.setSpeed(60); } } }