pygame is
pygame.org is
|
input.py
input.py - 1.0Beerman (beerman)Tags:DescriptionRather than your game logic having to deal with all the controllers directly, it allows you to define named controls which can map to multiple controllers at once. Simple example:
input = Input()
while running:
input.Poll()
ship.x += input.GetControl('THRUST')
ship.y += input.GetControl('CLIMB')
if input.GetControl('FIRE')
ship.fire()
if input.GetControl('QUIT'):
running = False
render()
Links
Releases
Pygame.org account CommentsIf you wish to leave a comment with your pygame.org account, please sign in first.
|
|