-
Notifications
You must be signed in to change notification settings - Fork 0
/
Automate.pde
71 lines (54 loc) · 1.38 KB
/
Automate.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
Globals globals = new Globals();
void setup()
{
size(800,600);
initglobals();
}
void draw()
{
background(200);
globals.game.active().update();
globals.game.active().draw();
//globals.mouseReleased = false;
globals.keyboard.update();
//DEBUG
//fill(#000000);
//textSize(14);
//text("" + mouseX + ", " + mouseY, width - 60f, 25f);
}
void initglobals()
{
globals.sprites.load(dataPath(""));
globals.ngFactory.load(dataPath("NonGriddles.json"));
globals.gFactory.load(dataPath("Griddles.json"));
globals.interactions.load(dataPath("Interactions.json"));
globals.ruleFactory.load(dataPath("Rules.json"));
globals.profiles.load(dataPath("Profiles.json"));
MainMenuGameFlow mm = new MainMenuGameFlow();
mm.save_path = dataPath("menu.json");
globals.game.push(mm);
}
//void mouseReleased()
//{
// globals.mouseReleased = true;
//}
void keyPressed()
{
globals.keyboard.handle_keyPressed();
}
void keyReleased()
{
globals.keyboard.handle_keyReleased();
}
String save_filename()
{
String retval = "save_";
retval += right("0000" + year(),4);
retval += right("00" + month(),2);
retval += right("00" + day(),2);
retval += right("00" + hour(),2);
retval += right("00" + minute(),2);
retval += right("00" + second(),2);
retval += ".json";
return retval;
}