forked from bedohswe/p3he
Make it possible to render an empty level.
This commit is contained in:
parent
e62f985e73
commit
00f930e151
7
main.py
7
main.py
@ -9,7 +9,7 @@ import pygame.freetype
|
||||
|
||||
from gyro import GyroVector, Poincare2Klein
|
||||
from constants import I, WHITE, BLACK, IROT, ROT, OFFSET
|
||||
from draw import draw
|
||||
from draw import draw, DrawnSegment
|
||||
from alert import Alert
|
||||
from engineevents import EngineEvent, EngineEventProcessingError
|
||||
from defaultcontrols import defaultcontrols
|
||||
@ -140,7 +140,10 @@ def mainLoop():
|
||||
aoEngineEvents = fvControl_ao()
|
||||
processevents()
|
||||
display.fill(WHITE)
|
||||
drawn = draw(level,gPlayer,pi/4,320,iDistScale)
|
||||
if len(level) != 0:
|
||||
drawn = draw(level,gPlayer,pi/4,320,iDistScale)
|
||||
else:
|
||||
drawn = [DrawnSegment(0, BLACK)] * 320
|
||||
pygame.draw.rect(display,sky, (0,0,1280,360))
|
||||
pygame.draw.rect(display,ground, (0,360,1280,360))
|
||||
n = 0
|
||||
|
Loading…
Reference in New Issue
Block a user