-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMap.java
More file actions
21 lines (17 loc) · 678 Bytes
/
Map.java
File metadata and controls
21 lines (17 loc) · 678 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import greenfoot.*; // import every greefoot function, object and more
public class Map extends World
{
public Map()
{
super(MapManager.getWidth(), MapManager.getHeight(), 1); // set worlds width, height and pixel size
Greenfoot.start(); // start greenfoot engine
MapManager.setMap(this); // handling which map should be shown
}
public void act() {
if (GameManager.isGameStarted()) {
NinjaEnemyManager.control(); // place ninjas radom
String time = GameManager.getConvertedPlayTime();
MapManager.showText(time, MapManager.getWidth() - 100, 30);
}
}
}