-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlevelCreator.py
More file actions
29 lines (24 loc) · 775 Bytes
/
levelCreator.py
File metadata and controls
29 lines (24 loc) · 775 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
# Import GameMaster
import pygame
from lib import LevelCreatorMaster
# Init the creator
LevelCreatorMaster.init()
LevelCreatorMaster.setLevelName("MyLevel")
LevelCreatorMaster.saveLevel()
# Loop until the user clicks the close button.
done = False
# -------- Main Program Loop -----------
while not done:
LevelCreatorMaster.resetCanvas()
for event in pygame.event.get():
if event.type == pygame.QUIT:
done = True
elif event.type == pygame.MOUSEBUTTONDOWN:
print("mouse click")
elif event.type == pygame.KEYDOWN:
print("key down")
if event.key == pygame.K_ESCAPE:
done = True
elif event.type == pygame.KEYUP:
print("key up")
pygame.display.flip()