-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
39 lines (28 loc) · 808 Bytes
/
main.py
File metadata and controls
39 lines (28 loc) · 808 Bytes
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
import pygame
from random import randint
from dungeon import Dungeon_room
from player import Player
pygame.init()
# окно
win_width = 1920
win_height = 1080
win = pygame.display.set_mode((win_width, win_height))
pygame.display.set_caption('#')
FPS = 120
clock = pygame.time.Clock()
hero = Player()
out_from = 'l'
# перенести на переход персонажа
next_room = randint(0, 6)
# перенести на переход персонажа
def dungeon():
room = Dungeon_room(win_width, win_height)
room.blit_new_room(out_from, win, next_room)
hero.blit(win)
while True:
for event in pygame.event.get():
if event.type == pygame.QUIT:
exit()
dungeon()
clock.tick(FPS)
pygame.display.flip()