-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBankApp.pde
89 lines (70 loc) · 1.74 KB
/
BankApp.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
import java.util.*;
import java.lang.reflect.Field;
import processing.sound.*;
import controlP5.*;
String username;
String password;
// * Util classes
Assets a = new Assets();
Variables v = new Variables();
TransitionIn transitionIn = new TransitionIn(this);
TransitionOut transitionOut = new TransitionOut(this);
// * Game classes
SignIn signIn = new SignIn(this);
Sidebar sidebar = new Sidebar(this);
AccountViewer accViewer = new AccountViewer(this);
void setup() {
size(1000, 1000);
background(255);
shapeMode(CENTER);
textAlign(CENTER);
imageMode(CENTER);
noStroke();
// Default fill color is black
fill(0);
a._setup(this);
v._setup();
v.accViewer = accViewer;
// Setup inputs
v.cp5 = new ControlP5(this);
signIn.setup();
sidebar.setup();
accViewer.setup();
setupAccounts();
// * SETUP CLASSES
}
void draw() {
background(255);
if (!signIn.trans) {
signIn.update();
}
// Update the other stuff here
if (v.signedIn) {
sidebar.update();
accViewer.update();
}
if (signIn.trans) {
signIn.update();
}
}
void mousePressed() {
signIn.mousePressed();
sidebar.mousePressed();
accViewer.mousePressed();
}
// Should be called onlly when the number of accounts is equal to 0
// Or at the start of the program
void setupAccounts() {
Account sam = new Account("FTX", -99999, "Sam", true);
Account r = new Account("Red sus", 500, "Red");
Account b = new Account("Blue sus", 5, "Blue");
Account g = new Account("Green sus", 5000, "Green");
Account y = new Account("Yellow sus", 500, "Yellow");
Account black = new Account("Black sus", 8000, "Black");
v.accounts.add(sam);
v.accounts.add(r);
v.accounts.add(b);
v.accounts.add(g);
v.accounts.add(y);
v.accounts.add(black);
}