formating
This commit is contained in:
parent
e0892cec7c
commit
ceeece0244
|
@ -22,6 +22,6 @@ def alien_table(index):
|
||||||
17: "Ditto",
|
17: "Ditto",
|
||||||
18: "Frankenstrike",
|
18: "Frankenstrike",
|
||||||
19: "Blitzwolfer",
|
19: "Blitzwolfer",
|
||||||
# TODO: Add more aliens
|
|
||||||
}.get(index, 0)
|
}.get(index, 0)
|
||||||
# list of aliens program can displays
|
# list of aliens program can displays
|
||||||
|
|
13
functions.py
13
functions.py
|
@ -1,10 +1,10 @@
|
||||||
from aliens import *
|
from aliens import *
|
||||||
from PIL import ImageTk, Image
|
from PIL import ImageTk, Image
|
||||||
from boombox import BoomBox
|
from boombox import BoomBox
|
||||||
|
|
||||||
counter = 0
|
counter = 0
|
||||||
# determans which image is shown
|
# determans which image is shown
|
||||||
|
|
||||||
|
|
||||||
def alien_select(index, omnitrix_button):
|
def alien_select(index, omnitrix_button):
|
||||||
BoomBox("res/sound_switch.mp3").play()
|
BoomBox("res/sound_switch.mp3").play()
|
||||||
global counter
|
global counter
|
||||||
|
@ -15,14 +15,17 @@ def alien_select(index, omnitrix_button):
|
||||||
omnitrix_button.image = img # keep a reference
|
omnitrix_button.image = img # keep a reference
|
||||||
# controls how much up or down the list you go
|
# controls how much up or down the list you go
|
||||||
|
|
||||||
|
|
||||||
def button_press():
|
def button_press():
|
||||||
BoomBox("res/sound_transformation.mp3").play()
|
BoomBox("res/sound_transformation.mp3").play()
|
||||||
# whenever the "middle_button" button is pressed play sound effect
|
# whenever the "middle_button" button is pressed play sound effect
|
||||||
|
|
||||||
|
|
||||||
def start():
|
def start():
|
||||||
BoomBox("res/sound_startup.mp3").play()
|
BoomBox("res/sound_startup.mp3").play()
|
||||||
# when program first starts up, plays sound effect
|
# when program first starts up, plays sound effect
|
||||||
|
|
||||||
|
|
||||||
def image_display(index):
|
def image_display(index):
|
||||||
alien = alien_table(index)
|
alien = alien_table(index)
|
||||||
if(alien == 0):
|
if(alien == 0):
|
||||||
|
@ -32,4 +35,4 @@ def image_display(index):
|
||||||
else:
|
else:
|
||||||
image_location = "res/" + alien + ".png"
|
image_location = "res/" + alien + ".png"
|
||||||
return image_location
|
return image_location
|
||||||
# if the next alien does not exists, resets counter, else returns image location
|
# if the next alien does not exists, resets counter, else returns image location
|
||||||
|
|
Loading…
Reference in a new issue