@@ -206,25 +206,40 @@ class StartScreen(Stage):
206
206
207
207
def __init__ (self , screen , config ):
208
208
Stage .__init__ (self , screen , config )
209
+
210
+ self .font = pygame .font .Font (None , 40 )
211
+ self .text = self .font .render ("START SCREEN: Press ESC" , True , BLACK )
212
+ self .text_rect = self .text .get_rect (center = self .screen_rect .center )
209
213
210
214
def draw (self , surface ):
211
215
surface .fill (RED )
216
+ surface .blit (self .text , self .text_rect )
212
217
213
218
class EndScreen (Stage ):
214
219
215
220
def __init__ (self , screen , config ):
216
221
Stage .__init__ (self , screen , config )
222
+
223
+ self .font = pygame .font .Font (None , 40 )
224
+ self .text = self .font .render ("END SCREEN: Press ESC" , True , BLACK )
225
+ self .text_rect = self .text .get_rect (center = self .screen_rect .center )
217
226
218
227
def draw (self , surface ):
219
228
surface .fill (GREEN )
229
+ surface .blit (self .text , self .text_rect )
220
230
221
231
class Game (Stage ):
222
232
223
233
def __init__ (self , screen , config ):
224
234
Stage .__init__ (self , screen , config )
235
+
236
+ self .font = pygame .font .Font (None , 40 )
237
+ self .text = self .font .render ("GAME: Press ESC" , True , BLACK )
238
+ self .text_rect = self .text .get_rect (center = self .screen_rect .center )
225
239
226
240
def draw (self , surface ):
227
241
surface .fill (BLUE )
242
+ surface .blit (self .text , self .text_rect )
228
243
229
244
# === MAIN === (lower_case names)
230
245
@@ -252,4 +267,4 @@ def __init__(self):
252
267
253
268
if __name__ == '__main__' :
254
269
255
- App ()#.run()
270
+ App () #.run()
0 commit comments