Lorenzo1818

Setup - CWiid, Pygame example.

Feb 20th, 2014
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.77 KB | None | 0 0
  1. """
  2. Program: setup
  3. Author: Lorenzo Benevento
  4. First - Last data modified: 17-02-2014
  5. Description: Software utilizzato per decidere il controller e la velocita
  6.     per il terzo script di prova.
  7. PyVersion: 2.* tested on 2.4.4
  8. """
  9.  
  10. import thirdScript
  11.  
  12. def setup():
  13.     print("1\tTastiera.\n2\tWiimote\n3\tJoystick.")
  14.     controller = int(input("Inserire il numero corrispondente al controller che si vuole usare: "))
  15.     velocita = int(input("\nInserire la velocita' a cui si desidera scorrano le immagini (px/s): "))
  16.     if controller == 1:
  17.         thirdScript.main("keyboard", velocita)
  18.     elif controller == 2:
  19.         thirdScript.main("wiimote", velocita)
  20.     elif controller == 3:
  21.         thirdScript.main("joystick", velocita)
  22.     else:
  23.         print("ERROR: Il controller inserito non e' valido.")
  24.  
  25. setup()
Advertisement
Add Comment
Please, Sign In to add comment