forked from asalga/Horadrix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ScreenGameOver.pde
46 lines (35 loc) · 938 Bytes
/
ScreenGameOver.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
/*
Displays game name and credits
*/
public class ScreenGameOver extends IScreen{
RetroFont solarWindsFont;
RetroLabel gameOverLabel;
RetroLabel retryLabel;
public void OnTransitionTo(){
}
public ScreenGameOver(){
// TODO: convert this to a singleton or factory.
solarWindsFont = new RetroFont("data/fonts/solarwinds.png", 14, 16, 2);
gameOverLabel = new RetroLabel(solarWindsFont);
gameOverLabel.setText("G A M E O V E R");
gameOverLabel.pixelsFromCenter(0, 0);
retryLabel = new RetroLabel(solarWindsFont);
retryLabel.setText("<< Retry? >>");
retryLabel.pixelsFromCenter(0, 50);
}
/**
*/
public void draw(){
background(0);
gameOverLabel.draw();
retryLabel.draw();
}
public void update(){
}
public String getName(){
return "gameover";
}
public void mousePressed(){
screens.setCurr(new ScreenGameplay());
}
}