-
Notifications
You must be signed in to change notification settings - Fork 0
/
task.pde
44 lines (37 loc) · 1.11 KB
/
task.pde
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
class Task extends Scene {
protected MoveToSceneObject sceneStarter;
protected GameObject replaceWith;
protected String description;
public boolean completed;
protected PVector minimapLocation;
protected PImage minimapIcon;
private int scoreAdd;
Task(String sceneName, String backgroundImageFile, MoveToSceneObject sceneStarter, GameObject replaceWith, String desc, PVector minimapLocation, PImage minimapIcon, int sa) {
super(sceneName, backgroundImageFile, null);
this.sceneStarter = sceneStarter;
this.replaceWith = replaceWith;
description = desc;
completed = false;
taskTracker.addTask(this);
this.minimapLocation = minimapLocation;
this.minimapIcon = minimapIcon;
scoreAdd = sa;
scoreMax += scoreAdd;
}
void setup() {
}
void draw() {
}
void done() {
sceneManager.goToPreviousScene();
sceneManager.getCurrentScene().removeGameObject(sceneStarter);
if (replaceWith != null)
sceneManager.getCurrentScene().addGameObject(replaceWith);
completed = true;
score += scoreAdd;
}
void mouseMoved() {
}
void mouseClicked() {
}
}