Skip to content

Commit 8db67c5

Browse files
committed
Added explanatory coments
1 parent 9f8b1e5 commit 8db67c5

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

common/Inputs.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,24 @@ def checkReady(self, multiPlayerState, singlePlayerState):
6666

6767
#increment readystates via detection methods
6868
if curBtnState == [True, True]:
69+
#both button pressed
6970
gv.lightController._pixels.fill((0,0,0))
7071
gameController.anim_cleared = True
7172
for light in gv.lightsObject.lights:
7273
light.clearAnim()
74+
75+
#increment counter and make sure other one is 0'd out
7376
gv.multiPlayerReadyCount = gv.multiPlayerReadyCount + 1
7477
gv.singlePlayerReadyCount = 0
78+
79+
#change player 2 tower to increment lights
7580
gv.lightController._lights[0].changeInPercSeq(Color(255,0,0), (gv.multiPlayerReadyCount / waitTime), gv.lightController._lights[0], gv.lightController._lights[2] )
81+
82+
#change player 1 tower to increment lights
7683
gv.lightController._lights[0].changeInPercSeq(Color(255,0,0), (gv.singlePlayerReadyCount / waitTime), gv.lightController._lights[3], gv.lightController._lights[5] )
84+
7785
elif curBtnState == [True, False]:
86+
#player one button pressed
7887
gv.lightController._pixels.fill((0,0,0))
7988
gameController.anim_cleared = True
8089
for light in gv.lightsObject.lights:
@@ -83,6 +92,7 @@ def checkReady(self, multiPlayerState, singlePlayerState):
8392
gv.multiPlayerReadyCount = 0
8493
gv.lightController._lights[0].changeInPercSeq(Color(0,255,40), (gv.singlePlayerReadyCount / waitTime), gv.lightController._lights[3], gv.lightController._lights[5] )
8594
elif curBtnState == [False, False] or curBtnState == [False, True]:
95+
#neutral or 2nd player only button pressed
8696
gv.singlePlayerReadyCount = 0
8797
gv.multiPlayerReadyCount = 0
8898
if gameController.anim_cleared == True:

0 commit comments

Comments
 (0)