-
Notifications
You must be signed in to change notification settings - Fork 3
/
Create.java
59 lines (48 loc) · 2 KB
/
Create.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import processing.core.PImage;
import java.util.List;
public class Create {
private static final String QUAKE_ID = "quake";
private static final int QUAKE_ACTION_PERIOD = 1100;
private static final int QUAKE_ANIMATION_PERIOD = 100;
public Create(){
}
public static Entity createMinerNotFull(String id, int resourceLimit, Point position, int actionPeriod, int animationPeriod,
List<PImage> images)
{
return new MinerNotFull(id, position, images, actionPeriod, animationPeriod, 0, resourceLimit);
}
public static Obstacle createObstacle(String id,
List<PImage> images, Point pos)
{
return new Obstacle(id, pos, images);
}
public static OreBlob createOreBlob(String id, int actionPeriod, int animationPeriod, List<PImage> images, Point pos)
{
return new OreBlob(id, pos, images, actionPeriod, animationPeriod);
}
public static Ore createOre(String id, int actionPeriod, Point pos,
List<PImage> images)
{
return new Ore(id, pos, images, actionPeriod);
}
public static Quake createQuake(List<PImage> images, Point pos)
{
return new Quake(QUAKE_ID, pos, images,
QUAKE_ACTION_PERIOD, QUAKE_ANIMATION_PERIOD);
}
public static Blacksmith createBlacksmith(String id, List<PImage> images, Point pos)
{
return new Blacksmith(id, pos, images);
}
public static Vein createVein(String id, int actionPeriod, Point pos,
List<PImage> images)
{
return new Vein(id, pos, images, actionPeriod);
}
public static MinerFull createMinerFull(String id, int resourceLimit, int actionPeriod, int animationPeriod, Point pos,
List<PImage> images)
{
return new MinerFull(id, pos, images,
resourceLimit, resourceLimit, actionPeriod, animationPeriod);
}
}