A gamepad usage example
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Pandemic_Pong/pong_constants.py

47 lines
1.1 KiB

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
pong_constants.py
Pandemic Pong global constants
"""
"""Buttons in 'state<n>'"""
BTN_STATE_NONE = 0 # No Button pressed ...
BTN_TRIGGER = 1 # [Blue/X]
BTN_THUMB = 2 # [Red/A]
BTN_THUMB2 = 4 # [Yellow/B]
BTN_TOP = 8 # [Green/Y]
BTN_TOP2 = 16 # [Frontal left]
BTN_PINKIE = 32 # [Frontal right]
BTN_BASE3 = 64 # [Centre left]
BTN_BASE4 = 128 # [Centre right]
# Colors to be used
COL_WHITE = 0 # White = not infectious
COL_BLUE = 1 # Virus color
COL_GREEN = 2 # Virus color
COL_RED = 3 # Virus color
COL_YELLOW = 4 # virus color
"""Infectiousness time"""
COLORDELAY = 100
"""Game states"""
STATE_WELCOME = 0
STATE_START = 1
STATE_PLAY = 2
STATE_GAMERESULTS = 3
STATE_FINALRESULTS = 4
STATE_RESTART = 5
STATE_EXIT = 6
"""File paths"""
wall_contact = './sounds/contact.ogg' # player & wall actually
player_contact = wall_contact
player_miss = './sounds/miss.wav'
game_splash = './sounds/splash.wav'
game_exit = './sounds/bye.wav'
game_win = './sounds/gamewin.wav'
match_win = './sounds/matchwin.wav'