forked from bedohswe/p3he
Add buttons to reset coordinates and angle.
This commit is contained in:
parent
9ceaba94d7
commit
28868e5451
@ -29,3 +29,5 @@ If no game is specified then "squareroom" will be loaded.
|
|||||||
| Print current position to the terminal | F4 |
|
| Print current position to the terminal | F4 |
|
||||||
| Save level to `./levels` folder | F5 |
|
| Save level to `./levels` folder | F5 |
|
||||||
| Snap to the closest point | F6 |
|
| Snap to the closest point | F6 |
|
||||||
|
| Snap to the origin | F7 |
|
||||||
|
| Snap the angle to the zero | F8 |
|
||||||
|
@ -58,6 +58,10 @@ def defaultcontrols():
|
|||||||
cMin = i.pointB
|
cMin = i.pointB
|
||||||
return GyroVector(cMin,gPlayer.cRot)
|
return GyroVector(cMin,gPlayer.cRot)
|
||||||
aoEngineEvents.append(EngineEvent('gPlayer', fX, tsArguments=('level','gPlayer')))
|
aoEngineEvents.append(EngineEvent('gPlayer', fX, tsArguments=('level','gPlayer')))
|
||||||
|
if event.key == pygame.K_F7:
|
||||||
|
aoEngineEvents.append(EngineEvent('gPlayer', lambda tgPlayer: GyroVector(0, tgPlayer[0].cRot)))
|
||||||
|
if event.key == pygame.K_F8:
|
||||||
|
aoEngineEvents.append(EngineEvent('gPlayer', lambda tgPlayer: GyroVector(tgPlayer[0].cPos, 1)))
|
||||||
|
|
||||||
keys = pygame.key.get_pressed()
|
keys = pygame.key.get_pressed()
|
||||||
if keys[pygame.K_d]:
|
if keys[pygame.K_d]:
|
||||||
|
Loading…
Reference in New Issue
Block a user