-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathExit.py
36 lines (32 loc) · 1021 Bytes
/
Exit.py
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
from GameObject import GameObject, Brain
import pygame
from pygame.locals import *
class Exit(GameObject):
def __init__(self, maze, position):
GameObject.__init__(
self,
'E',
position,
0,
color = (0, 255, 0)
)
def render_avatar(self, camera):
#render the exit
bottom = camera.square_center_bottom
left = camera.pov_width / 2 - camera.square_center_height / 2
right = camera.pov_width / 2 + camera.square_center_height / 2
top = camera.square_center_bottom - camera.square_center_height
# pygame.draw.aalines(
# camera.surface, self.color, True,
# [
# [left, top],
# [right, top],
# [right, bottom],
# [left, bottom]
# ]
# )
pygame.draw.rect(
camera.surface, self.color, (
(left, top), (right-left, bottom-top)
)
)