It doesn't do anything.
checking your MyWorld code, you didn't add any actors in the world. The line should be like this: addObject(new CodeMonkey(), 120, 140);
checking your CodeMonkey code, it works fine, but has one problem. you set the image in the act method, so you are putting the same image over and over again.
Create a constructor for your class
public CodeMonkey() {
setImage("CodeMonkey.png");
}
or simply set the image using the right button in the class, and then use menu option "Set image..."
May I suggest a change?
In class Mobil instead of using turn(45), use
setRotation(0); // right
setRotation(180); // left
setRotation(90); //down
setRotation(270); //up
and move(5);
and you can delete the nested if -elses, arah variable and the setLocations
2026/11/20
Shooting Elephant reloaded
2017/8/1
Battleship
2017/8/1
Tutorial POO
2017/7/30
Battleship
2017/2/11
Simple Adventure Game
2017/2/3
Battleship
2017/1/31
Battleship
2016/5/26
Killer Queen
2016/5/25
Chase the Elephants