Compare commits
2 Commits
a2447c8f72
...
380b9f96a4
Author | SHA1 | Date | |
---|---|---|---|
380b9f96a4 | |||
42f88ff93b |
6
main.py
6
main.py
@ -102,6 +102,8 @@ def mainLoop():
|
|||||||
if event.type == pygame.KEYDOWN:
|
if event.type == pygame.KEYDOWN:
|
||||||
if event.key == pygame.K_q:
|
if event.key == pygame.K_q:
|
||||||
gPlayer.cRot *= -1
|
gPlayer.cRot *= -1
|
||||||
|
if event.key == pygame.K_F3:
|
||||||
|
debugInfo = not debugInfo
|
||||||
keys = pygame.key.get_pressed()
|
keys = pygame.key.get_pressed()
|
||||||
if keys[pygame.K_d]:
|
if keys[pygame.K_d]:
|
||||||
gPlayer.rotate(ROT)
|
gPlayer.rotate(ROT)
|
||||||
@ -111,8 +113,6 @@ def mainLoop():
|
|||||||
gPlayer -= GyroVector(OFFSET * gPlayer.cRot, 1)
|
gPlayer -= GyroVector(OFFSET * gPlayer.cRot, 1)
|
||||||
if keys[pygame.K_s]:
|
if keys[pygame.K_s]:
|
||||||
gPlayer += GyroVector(OFFSET * gPlayer.cRot, 1)
|
gPlayer += GyroVector(OFFSET * gPlayer.cRot, 1)
|
||||||
if keys[pygame.K_F3]:
|
|
||||||
debugInfo = not debugInfo
|
|
||||||
|
|
||||||
display.fill(WHITE)
|
display.fill(WHITE)
|
||||||
#pygame.draw.rect(display,BLACK, c_tr(Poincare2Klein(gPlayer.cPos) * -100) + (100,100),0)
|
#pygame.draw.rect(display,BLACK, c_tr(Poincare2Klein(gPlayer.cPos) * -100) + (100,100),0)
|
||||||
@ -133,7 +133,7 @@ def mainLoop():
|
|||||||
for i in level:
|
for i in level:
|
||||||
a = complex(Poincare2Klein(MobiusAdd(i.pointA,-gPlayer.cPos)))
|
a = complex(Poincare2Klein(MobiusAdd(i.pointA,-gPlayer.cPos)))
|
||||||
b = complex(Poincare2Klein(MobiusAdd(i.pointB,-gPlayer.cPos)))
|
b = complex(Poincare2Klein(MobiusAdd(i.pointB,-gPlayer.cPos)))
|
||||||
print(a,b)
|
pygame.draw.line(display, WHITE, (a.real * 100 + 100, (a.imag * 100 + 200)), (b.real * 100 + 100, (b.imag * 100 + 200)))
|
||||||
|
|
||||||
pygame.display.update()
|
pygame.display.update()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user